/** * Start the shell and interactive console. * * @return void */ public function main() { if (!class_exists('Boris\\Boris')) { $this->err('<error>Unable to load Boris\\Boris.</error>'); $this->err(''); $this->err('Make sure you have installed boris as a dependency,'); $this->err('and that Boris\\Boris is registered in your autoloader.'); $this->err(''); $this->err('If you are using composer run'); $this->err(''); $this->err('<info>$ php composer.phar require d11wtq/boris</info>'); $this->err(''); return 1; } if (!function_exists('pcntl_signal')) { $this->err('<error>No process control functions.</error>'); $this->err(''); $this->err('You are missing the pcntl extension, the interactive console requires this extension.'); return 2; } $this->out('You can exit with <info>CTRL-D</info>'); Log::drop('debug'); Log::drop('error'); $this->_io->setLoggers(false); restore_error_handler(); restore_exception_handler(); $boris = new Boris('app > '); $boris->start(); }
protected function execute(InputInterface $input, OutputInterface $output) { $application = $this->getApplication(); $application->setCatchExceptions(false); $application->setAutoExit(false); $container = $this->getContainer(); $boris = new Boris('php> '); $boris->setLocal(array('container' => $container, 'kernel' => $container->get('kernel'))); $boris->start(); }
/** * {@inheritdoc} */ protected function fire() { $requiredExtensions = array('readline', 'posix', 'pcntl'); foreach ($requiredExtensions as $extension) { if (!extension_loaded($extension)) { throw new \Exception(sprintf('PHP %s extension is required for this command.', $extension)); } } $boris = new Boris('> '); $boris->start(); }
protected function execute(InputInterface $input, OutputInterface $output) { $app = $this->getApplication(); $kernel = $app->getKernel(); $container = $kernel->getContainer(); $app->setCatchExceptions(false); $boris = new Boris(); $boris->setPrompt($this->getPrompt()); $boris->setLocal(array('app' => $app, 'kernel' => $kernel, 'container' => $container) + $this->getServices()); $boris->start(); }
protected function execute(InputInterface $input, OutputInterface $output) { // Prevent PHP notice. $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; define('DRUPAL_ROOT', __DIR__ . '/../../../../../..'); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); $this->getApplication()->setCatchExceptions(false); $boris = new Boris(); $boris->setPrompt('oxygen> '); $boris->start(); }
/** * Execute the console command. * * @return void */ public function fire() { // Disable the exception/error handlers so Boris can handle them restore_error_handler(); restore_exception_handler(); $this->laravel->make('artisan')->setCatchExceptions(false); // Stop the shutdown handler outputting a JSON error object $this->laravel->error(function () { return ''; }); // Run Boris $boris = new Boris(); $boris->start(); }
public function ConsoleAction() { /* @var $request \Zend\Console\Request */ /* @var $console \Zend\Console\AdapterInterface */ $request = $this->getRequest(); $console = $this->getServiceLocator()->get('console'); $usingStdout = false; $output = STDOUT; $console->writeLine("starting console...", Color::GREEN); $Application = $this->getServiceLocator()->get('Application'); $ServiceManager = $this->getServiceLocator()->get('ServiceManager'); $boris = new Boris(); $boris->setLocal(['Application' => $Application, 'ServiceManager' => $ServiceManager, 'Console' => $console]); $boris->start(); }
/** * Start the shell and interactive console. * * @return void */ public function main() { if (!class_exists('Boris\\Boris')) { $this->err('<error>Unable to load Boris\\Boris.</error>'); $this->err(''); $this->err('Make sure you have installed boris as a dependency,'); $this->err('and that Boris\\Boris is registered in your autoloader.'); $this->err(''); $this->err('If you are using composer run'); $this->err(''); $this->err('<info>$ php composer.phar require d11wtq/boris</info>'); $this->err(''); return 1; } $this->out('You can exit with <info>CTRL-D</info>'); Log::drop('debug'); Log::drop('error'); restore_error_handler(); restore_exception_handler(); $boris = new Boris('app > '); $boris->start(); }
/** * Fire the command. */ public function fire() { $boris = new Boris('rocketeer> '); $boris->setLocal(['rocketeer' => $this->laravel, 'ssh' => $this->laravel['rocketeer.bash']]); $boris->start(); }
public function __construct($prompt = 'cli> ', $historyFile = null) { parent::__construct($prompt, $historyFile); $this->setInspector(new ColoredInspector()); }
protected function execute(InputInterface $input, OutputInterface $output) { $boris = new Boris('supra> '); $boris->setLocal(array('container' => $this->container, 'application' => $this->getApplication())); $boris->start(); }
public function initialize(\Boris\Boris $boris, $dir) { $boris->setPrompt($this->name . '> '); }
public function execute(InputInterface $input, OutputInterface $output) { $boris = new Boris('ouzo> '); $boris->start(); }
/** * Executes the task * * @param array $uParameters parameters * * @return int exit code */ public function executeTask(array $uParameters) { $tBoris = new Boris("scabbia> "); $tBoris->start(); return 0; }