本文整理汇总了PHP中Tracy\Debugger::productionMode方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::productionMode方法的具体用法?PHP Debugger::productionMode怎么用?PHP Debugger::productionMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracy\Debugger
的用法示例。
在下文中一共展示了Debugger::productionMode方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __init
public function __init($directory = NULL, $email = NULL, BlueScreen $blueScreen = NULL)
{
if (!$directory) {
$directory = __DIR__ . "/../log/";
}
if (getenv("MONDA_DEBUG")) {
if (array_key_exists(getenv("MONDA_DEBUG"), self::$levels)) {
self::$loglevel = self::$levels[getenv("MONDA_DEBUG")];
Debugger::$productionMode = false;
} else {
self::log("Unknown log level!\n", Debugger::ERROR);
}
} else {
if (Options::get("debug")) {
if (array_key_exists(Options::get("debug"), self::$levels)) {
self::$loglevel = self::$levels[Options::get("debug")];
Debugger::$productionMode = false;
} else {
self::log("Unknown log level!\n", Debugger::ERROR);
}
}
}
self::$wwwlogger = new \Tracy\Logger($directory, $email, $blueScreen);
if (PHP_SAPI == "cli") {
if (Options::get("logfile")) {
self::$logfd = fopen(Options::get("logfile"), "w");
} else {
self::$logfd = STDERR;
}
}
}
示例2: init
public function init()
{
$grav = Grav::instance();
/** @var Config $config */
$config = $grav['config'];
$mode = $config->get('system.debugger.mode');
TracyDebugger::$logDirectory = $config->get('system.debugger.log.enabled') ? LOG_DIR : null;
TracyDebugger::$maxDepth = $config->get('system.debugger.max_depth');
// Switch debugger into development mode if configured
if ($config->get('system.debugger.enabled')) {
if ($config->get('system.debugger.strict')) {
TracyDebugger::$strictMode = true;
}
if (function_exists('ini_set')) {
ini_set('display_errors', true);
}
if ($mode == strtolower('detect')) {
TracyDebugger::$productionMode = self::DETECT;
} elseif ($mode == strtolower('production')) {
TracyDebugger::$productionMode = self::PRODUCTION;
} else {
TracyDebugger::$productionMode = self::DEVELOPMENT;
}
}
}
示例3: createContainer
/**
* @param bool $debugMode
* @return Nette\DI\Container
*/
protected function createContainer($debugMode)
{
$config = new Nette\Configurator();
$config->setTempDirectory(TEMP_DIR);
$config->setDebugMode($debugMode);
Debugger::$productionMode = !$debugMode;
QueryPanelExtension::register($config);
$config->addConfig(__DIR__ . '/config.neon');
return $config->createContainer();
}
示例4: initialize
protected function initialize(InputInterface $input, OutputInterface $output)
{
parent::initialize($input, $output);
Debugger::$productionMode = !$input->getOption('debug-mode');
$this->cacheCleaner->invalidate();
}
示例5: startup
public function startup()
{
parent::startup();
Debugger::$productionMode = TRUE;
}
示例6: renderActualMode
/** render actual mode block */
public function renderActualMode()
{
Debugger::$productionMode = true;
$params = $this->request->getParameters();
if (isset($params['security'])) {
$params['security'] = $this->wifisecService->getById(intval($params['security']))->getLabel();
}
if (isset($params['mode'])) {
$params['mode'] = array_key_exists($params['mode'], self::$modesLabels) ? self::$modesLabels[$params['mode']] : $params['mode'];
} else {
$params['mode'] = self::$modesLabels[self::DEFAULT_MODE];
}
if (isset($params['source'])) {
$params['source'] = $this->sourceManager->getById(intval($params['source'])) ? $this->sourceManager->getById(intval($params['source']))->name : $params['source'];
}
if (isset($params['ssidmac'])) {
$params['ssidmac'] = urldecode($params['ssidmac']);
}
unset($params['id']);
unset($params['gm']);
unset($params['action']);
$this->template->parameters = $params;
}
示例7:
<?php
require __DIR__ . '/../vendor/autoload.php';
$configurator = new Nette\Configurator();
$configurator->setTempDirectory(getenv("MONDA_TMP"));
$configurator->createRobotLoader()->addDirectory(__DIR__)->addDirectory(__DIR__ . '/../vendor/others')->register();
$configurator->addConfig(__DIR__ . '/config/config.neon');
$container = $configurator->createContainer();
use Tracy\Debugger;
if (!getenv("MONDA_CLI")) {
Debugger::enable(array('127.0.0.1'), __DIR__ . "/../log/");
} else {
Debugger::enable(Debugger::DETECT, __DIR__ . "/../log/");
Debugger::$productionMode = false;
Debugger::setLogger(new \App\Model\CliLogger());
}
return $container;
示例8: generateSuccess
/**
* @return void
*/
public function generateSuccess()
{
$template = $this->createTemplate('api_docu_success.latte');
$template->setParameters(['apiDir' => $this->api_dir]);
if (class_exists('Tracy\\Debugger')) {
Debugger::$productionMode = TRUE;
}
echo (string) $template;
}
示例9: startup
public function startup()
{
parent::startup();
Tracy\Debugger::$productionMode = true;
}