/** * @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!'); } }
?> ", 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
$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"); } }