本文整理汇总了PHP中Nette\Diagnostics\Debugger::email方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::email方法的具体用法?PHP Debugger::email怎么用?PHP Debugger::email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nette\Diagnostics\Debugger
的用法示例。
在下文中一共展示了Debugger::email方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createContainer
/**
* Returns system DI container.
* @return \SystemContainer
*/
public function createContainer()
{
$container = parent::createContainer();
// We setup email for bug reporting from config file
// (if not set up in bootstrap)
if (isset($container->parameters['errorRecipients'])) {
if (Nette\Diagnostics\Debugger::$email === NULL) {
Nette\Diagnostics\Debugger::$email = $container->parameters['errorRecipients'];
}
}
return $container;
}
示例2: function
<?php
/**
* My Application bootstrap file.
*/
use Nette\Diagnostics\Debugger, Nette\Application\Routers\SimpleRouter, Nette\Application\Routers\Route;
// Load Nette Framework
// this allows load Nette Framework classes automatically so that
// you don't have to litter your code with 'require' statements
require LIBS_DIR . '/Nette/loader.php';
// Enable Nette\Debug for error visualisation & logging
Debugger::$strictMode = TRUE;
Debugger::$email = 'root@fks.sk';
Debugger::enable();
// Load configuration from config.neon file
$configurator = new Nette\Configurator();
$configurator->loadConfig(__DIR__ . '/config.neon');
setlocale(LC_ALL, 'sk_SK.utf8');
$configurator->container->addService('sources', function ($cont) {
$s = new SourceContainer();
$s->params['database'] = $cont->database;
return $s;
});
$configurator->container->addService('authenticator', function ($cont) {
return new \Authenticator($cont->database);
});
$routes = $configurator->container->params['routes'];
// Configure application
$application = $configurator->container->application;
$application->errorPresenter = 'Error';
//$application->catchExceptions = TRUE;
示例3:
<?php
/**
* My Application bootstrap file.
*/
use Nette\Application\Routers\Route, Nette\Application\Routers\RouteList, Nette\Diagnostics\Debugger, Nette\Forms\Container;
date_default_timezone_set('UTC');
// Load Nette Framework or autoloader generated by Composer
require __DIR__ . '/../vendor/autoload.php';
// Enable Nette Debugger for error visualisation & logging
Debugger::$logDirectory = __DIR__ . '/../log';
Debugger::$strictMode = TRUE;
Debugger::$email = 'dont-send-emails@random.com';
// $debugArray is defined in setup-debug-mode.php
if (function_exists('isDebugMode') and isDebugMode($debugArray) == true) {
Debugger::enable(Debugger::DEVELOPMENT);
} else {
Debugger::enable();
}
// Configure application
$configurator = new \Nette\Configurator();
if (function_exists('isDebugMode') and isDebugMode($debugArray) == true) {
$configurator->setDebugMode(true);
}
// Enable RobotLoader - this will load all classes automatically
$configurator->setTempDirectory(__DIR__ . '/../temp');
$configurator->createRobotLoader()->addDirectory(APP_DIR)->register();
// Create Dependency Injection container from config.neon file
$configurator->addConfig(__DIR__ . '/config/config.neon', false);
$configurator->addConfig(__DIR__ . '/config/config.local.neon', false);
$container = $configurator->createContainer();