Since: 3.0.0
Author: Henry Ruhs
Example #1
0
 /**
  * run the command
  *
  * @since 3.0.0
  *
  * @param string $mode name of the mode
  *
  * @return string
  */
 public function run($mode = null)
 {
     $parser = new Parser($this->_request);
     $parser->init($mode);
     /* run command */
     return $this->_list($parser->getArgument(1));
 }
Example #2
0
 /**
  * run the command
  *
  * @since 3.0.0
  *
  * @param string $mode name of the mode
  *
  * @return string
  */
 public function run($mode = null)
 {
     $parser = new Parser($this->_request);
     $parser->init($mode);
     /* run command */
     $argumentKey = $parser->getArgument(1);
     if ($argumentKey === 'database') {
         return $this->_database($parser->getOption());
     }
     return $this->getHelp();
 }
Example #3
0
 /**
  * run the command
  *
  * @param string $mode name of the mode
  *
  * @since 3.0.0
  *
  * @return string
  */
 public function run($mode = null)
 {
     $parser = new Parser($this->_request);
     $parser->init($mode);
     /* run command */
     $argumentKey = $parser->getArgument(1);
     if ($argumentKey === 'clear') {
         return $this->_clear($parser->getOption());
     }
     if ($argumentKey === 'clear-invalid') {
         return $this->_clearInvalid($parser->getOption());
     }
     return $this->getHelp();
 }
Example #4
0
 /**
  * run the command
  *
  * @since 3.0.0
  *
  * @param string $mode name of the mode
  *
  * @return string
  */
 public function run($mode = null)
 {
     $parser = new Parser($this->_request);
     $parser->init($mode);
     /* run command */
     $argumentKey = $parser->getArgument(1);
     if ($argumentKey === 'list') {
         return $this->_list();
     }
     if ($argumentKey === 'set') {
         return $this->_set($parser->getOption());
     }
     if ($argumentKey === 'parse') {
         return $this->_parse($parser->getOption());
     }
     if ($argumentKey === 'lock') {
         return $this->_lock($parser->getOption());
     }
     return $this->getHelp();
 }
Example #5
0
 /**
  * testGetOptionInvalid
  *
  * @since 3.0.0
  */
 public function testGetOptionInvalid()
 {
     /* setup */
     $parser = new Console\Parser($this->_request);
     $parser->init('cli');
     /* actual */
     $actual = $parser->getOption('invalidOption');
     /* compare */
     $this->assertFalse($actual);
 }