當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Admin::isInMaintenanceMode方法代碼示例

本文整理匯總了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!');
     }
 }
開發者ID:elavarasann,項目名稱:pimcore,代碼行數:16,代碼來源:AbstractCommand.php

示例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 
開發者ID:pimcore,項目名稱:pimcore,代碼行數:31,代碼來源:index.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");
    }
}
開發者ID:yonetici,項目名稱:pimcore-coreshop-demo,代碼行數:31,代碼來源:startup.php


注:本文中的Pimcore\Tool\Admin::isInMaintenanceMode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。