当前位置: 首页>>代码示例>>PHP>>正文


PHP Debugger::strictMode方法代码示例

本文整理汇总了PHP中Nette\Diagnostics\Debugger::strictMode方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::strictMode方法的具体用法?PHP Debugger::strictMode怎么用?PHP Debugger::strictMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Nette\Diagnostics\Debugger的用法示例。


在下文中一共展示了Debugger::strictMode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: enableDebugger

 /**
  * @param  string        error log directory
  * @param  string        administrator email
  * @return void
  */
 public function enableDebugger($logDirectory = NULL, $email = NULL)
 {
     Nette\Diagnostics\Debugger::$strictMode = TRUE;
     Nette\Diagnostics\Debugger::enable($this->parameters['productionMode'], $logDirectory, $email);
 }
开发者ID:vrtak-cz,项目名称:nette-doctrine-sandbox,代码行数:10,代码来源:Configurator.php

示例2: Route

<?php

/**
 * My Application bootstrap file.
 */
use Nette\Diagnostics\Debugger, Nette\Application\Routers\Route;
// Load Nette Framework
require LIBS_DIR . '/Nette/loader.php';
// Enable Nette Debugger for error visualisation & logging
Debugger::$logDirectory = __DIR__ . '/../log';
Debugger::$strictMode = TRUE;
Debugger::enable();
// Configure application
$configurator = new Nette\Config\Configurator();
$configurator->setTempDirectory(__DIR__ . '/../temp');
// Enable RobotLoader - this will load all classes automatically
$configurator->createRobotLoader()->addDirectory(APP_DIR)->addDirectory(LIBS_DIR)->register();
// Create Dependency Injection container from config.neon file
$configurator->addConfig(__DIR__ . '/config/config.neon');
$container = $configurator->createContainer();
// Opens already started session
if ($container->session->exists()) {
    $container->session->start();
}
// Setup router
$router = $container->router;
if (MobileDetection::isMobile()) {
    // mobile routing
    $router[] = new Route('index.php', 'Mobile:Homepage:default', Route::ONE_WAY);
    $router[] = new Route('<presenter>/<action>[/<id>]', 'Mobile:Homepage:default');
} else {
开发者ID:rostenkowski,项目名称:nette-plugins,代码行数:31,代码来源:example.bootstrap.php

示例3: die

     echo "Required dependency missing: Nette Framework\n";
     die(1);
 }
 if (!class_exists('Texy')) {
     echo "Required dependency missing: Texy library\n";
     die(1);
 }
 if (!class_exists('FSHL\\Highlighter')) {
     echo "Required dependency missing: FSHL library\n";
     die(1);
 }
 if (!class_exists('TokenReflection\\Broker')) {
     echo "Required dependency missing: TokenReflection library\n";
     die(1);
 }
 Debugger::$strictMode = true;
 Debugger::$onFatalError[] = function () {
     echo "\nFor more information turn on the debug mode using the --debug option.\n";
 };
 Debugger::enable(Debugger::PRODUCTION, false);
 $start = new \DateTime();
 $options = $_SERVER['argv'];
 array_shift($options);
 $config = new Config();
 $config->processCliOptions($options);
 $generator = new Generator($config);
 // Help
 if ($config->isHelpRequested()) {
     echo $generator->colorize($generator->getHeader());
     echo $generator->colorize($config->getHelp());
     die;
开发者ID:genextwebs,项目名称:dropbox-sample,代码行数:31,代码来源:apigen.php

示例4: debug

/**
 * Nette\Diagnostics\Debugger::enable() shortcut.
 */
function debug()
{
    Debugger::$strictMode = TRUE;
    Debugger::enable(Debugger::DEVELOPMENT);
}
开发者ID:radeksimko,项目名称:nette,代码行数:8,代码来源:shortcuts.php

示例5: enableDebugger

 /**
  * @param  string        error log directory
  * @param  string        administrator email
  */
 public function enableDebugger($logDirectory = NULL, $email = NULL)
 {
     $debugMode = $this->isDebugMode();
     if (isset($this->parameters['debugModeLogin']['name']) && isset($this->parameters['debugModeLogin']['password'])) {
         if (isset($_GET['debugMode'])) {
             if ($_GET['debugMode']) {
                 if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] !== $this->parameters['debugModeLogin']['name'] || $_SERVER['PHP_AUTH_PW'] !== $this->parameters['debugModeLogin']['password']) {
                     header('WWW-Authenticate: Basic realm="Debug mode"');
                     header('HTTP/1.0 401 Unauthorized');
                     exit;
                 }
             }
         }
         if (isset($this->parameters['debugModeLogin']['name']) && isset($this->parameters['debugModeLogin']['password']) && isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] === $this->parameters['debugModeLogin']['name'] && $_SERVER['PHP_AUTH_PW'] === $this->parameters['debugModeLogin']['password']) {
             $debugMode = TRUE;
         }
     }
     Debugger::$strictMode = TRUE;
     Debugger::enable(!$debugMode, $logDirectory ?: $this->parameters['logDir'], $email);
 }
开发者ID:svobodni,项目名称:web,代码行数:24,代码来源:Configurator.php

示例6: RobotLoader

<?php

define('LIBS_DIR', __DIR__ . '/../libs');
require_once LIBS_DIR . '/Nette/loader.php';
require_once LIBS_DIR . '/dump.php';
use Nette\Diagnostics\Debugger as Debug;
use Nette\Environment;
use Nette\Loaders\RobotLoader;
Debug::enable(false);
Debug::$strictMode = true;
Environment::setVariable('tempDir', __DIR__ . '/tmp');
$r = new RobotLoader();
$r->setCacheStorage(Environment::getContext()->cacheStorage);
$r->addDirectory(LIBS_DIR);
$r->addDirectory(__DIR__ . '/cases');
$r->register();
require_once __DIR__ . '/TestCase.php';
开发者ID:rostenkowski,项目名称:HttpPHPUnit,代码行数:17,代码来源:boot.php


注:本文中的Nette\Diagnostics\Debugger::strictMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。