Redaxscript\Console\Command\Help::run PHP Метод

run() публичный Метод

run the command
С версии: 3.0.0
public run ( string $mode = null ) : string
$mode string name of the mode
Результат string
    public function run($mode = null)
    {
        $parser = new Parser($this->_request);
        $parser->init($mode);
        /* run command */
        return $this->_list($parser->getArgument(1));
    }

Usage Example

Пример #1
0
 /**
  * testHelp
  *
  * @since 3.0.0
  */
 public function testHelp()
 {
     /* setup */
     $this->_request->setServer('argv', ['console.php', 'help', 'help']);
     $helpCommand = new Command\Help($this->_registry, $this->_request, $this->_config);
     /* expect and actual */
     $expect = $helpCommand->getHelp();
     $actual = $helpCommand->run('cli');
     /* compare */
     $this->assertEquals($expect, $actual);
 }