Example #1
0
 public function __construct(App $app)
 {
     parent::__construct($app);
     $this->addCommand('version', array($this, 'showVersion'), tr('Show the application and framework version'));
     $this->addCommand('help', array($this, 'showHelp'), tr('Show this help'));
     $this->addCommand('trace', array($this, 'showTrace'), tr('Show stack trace for most recent exception'));
     $this->addCommand('exit', array($this, 'stop'), tr('Ends the shell session'));
     $this->addOption('help', 'h');
     $this->addOption('version', 'v');
     $this->addOption('trace', 't');
     $this->addOption('debug', 'd');
 }
Example #2
0
 /**
  * Construct
  * @param App $app Application.
  */
 public function __construct(App $app)
 {
     parent::__construct($app);
     $this->addCommand('update', array($this, 'update'), tr('Update one or more libraries'));
     $this->addCommand('install', array($this, 'install'), tr('Download and install libraries'));
     $this->addCommand('remove', array($this, 'remove'), tr('Remove a library'));
     $this->addCommand('info', array($this, 'info'), tr('Show library info'));
     $this->addCommand('list', array($this, 'list_'), tr('List installed/available libraries'));
     $this->addCommand('search', array($this, 'search'), tr('Search for libraries in available repositories'));
     $this->addOption('user');
     $this->addOption('share');
 }