public static function getInstance() { if (self::$instance == false) { self::$instance = new ConsoleApplication(); } return self::$instance; }
/** * {@inheritdoc} */ public function doRun(InputInterface $input, OutputInterface $output) { $this->registerCommands(); parent::doRun($input, $output); if ($this->getCommandName($input) == 'list' && $this->container->hasParameter('console.warning')) { $io = new DrupalStyle($input, $output); $io->warning($this->trans($this->container->getParameter('console.warning'))); } }
/** * {@inheritdoc} */ public function doRun(InputInterface $input, OutputInterface $output) { $this->registerGenerators(); $this->registerCommands(); $clear = $this->container->get('console.configuration_manager')->getConfiguration()->get('application.clear') ?: false; if ($clear === true || $clear === 'true') { $output->write(sprintf("c")); } parent::doRun($input, $output); if ($this->getCommandName($input) == 'list' && $this->container->hasParameter('console.warning')) { $io = new DrupalStyle($input, $output); $io->warning($this->trans($this->container->getParameter('console.warning'))); } }
/** * @brief Constructor. */ public function __construct() { Console::debug("Constructing service instance"); // register_shutdown_function(array(&$this, 'fatal')); gc_enable(); declare (ticks=1); register_tick_function(array($this, 'checkstate')); parent::__construct(); }
<?php require_once dirname(__FILE__) . '/../vendor/autoload.php'; require_once dirname(__FILE__) . '/../ruxon/kernel/kernel.php'; Core::init(ConsoleApplication::getInstance()); Core::app()->run();