Пример #1
0
 public static function getInstance()
 {
     if (self::$instance == false) {
         self::$instance = new ConsoleApplication();
     }
     return self::$instance;
 }
Пример #2
0
 /**
  * {@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')));
     }
 }
Пример #3
0
 /**
  * {@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')));
     }
 }
Пример #4
0
 /**
  * @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();
 }
Пример #5
0
<?php

require_once dirname(__FILE__) . '/../vendor/autoload.php';
require_once dirname(__FILE__) . '/../ruxon/kernel/kernel.php';
Core::init(ConsoleApplication::getInstance());
Core::app()->run();