本文整理匯總了PHP中Pimcore\Tool\Admin::isInMaintenanceMode方法的典型用法代碼示例。如果您正苦於以下問題:PHP Admin::isInMaintenanceMode方法的具體用法?PHP Admin::isInMaintenanceMode怎麽用?PHP Admin::isInMaintenanceMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pimcore\Tool\Admin
的用法示例。
在下文中一共展示了Admin::isInMaintenanceMode方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initialize
/**
* @param InputInterface $input
* @param OutputInterface $output
*/
protected function initialize(InputInterface $input, OutputInterface $output)
{
parent::initialize($input, $output);
$this->input = $input;
$this->output = $output;
// use Console\Dumper for nice debug output
$this->dumper = new Dumper($this->output);
// skip if maintenance mode is on and the flag is not set
if (Admin::isInMaintenanceMode() && !$input->getOption('ignore-maintenance-mode')) {
throw new \RuntimeException('In maintenance mode - set the flag --ignore-maintenance-mode to force execution!');
}
}
示例2:
?>
",
version: "<?php
echo \Pimcore\Version::getVersion();
?>
",
build: "<?php
echo \Pimcore\Version::$revision;
?>
",
maintenance_active: <?php
echo $this->maintenance_enabled;
?>
,
maintenance_mode: <?php
echo \Pimcore\Tool\Admin::isInMaintenanceMode() ? "true" : "false";
?>
,
mail: <?php
echo $this->mail_settings_complete;
?>
,
debug: <?php
echo \Pimcore::inDebugMode() ? "true" : "false";
?>
,
devmode: <?php
echo PIMCORE_DEVMODE ? "true" : "false";
?>
,
google_analytics_enabled: <?php
示例3: error_reporting
$front->setResponse(new \Zend_Controller_Response_Cli());
// generic pimcore setup
\Pimcore::setSystemRequirements();
\Pimcore::initAutoloader();
\Pimcore::initConfiguration();
\Pimcore::setupFramework();
\Pimcore::initLogger();
\Pimcore::initModules();
\Pimcore::initPlugins();
//Activate Inheritance for cli-scripts
\Pimcore::unsetAdminMode();
Document::setHideUnpublished(true);
Object\AbstractObject::setHideUnpublished(true);
Object\AbstractObject::setGetInheritedValues(true);
Object\Localizedfield::setGetFallbackValues(true);
// CLI has no memory/time limits
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', -1);
@ini_set('max_input_time', -1);
// Error reporting is enabled in CLI
@ini_set("display_errors", "On");
@ini_set("display_startup_errors", "On");
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
// Pimcore\Console handles maintenance mode through the AbstractCommand
if (!$pimcoreConsole) {
// skip if maintenance mode is on and the flag is not set
// we cannot use \Zend_Console_Getopt here because it doesn't allow to be called twice (unrecognized parameter, ...)
if (\Pimcore\Tool\Admin::isInMaintenanceMode() && !in_array("--ignore-maintenance-mode", $_SERVER['argv'])) {
die("in maintenance mode -> skip\nset the flag --ignore-maintenance-mode to force execution \n");
}
}