Webmozart\Console\Api\Application\Application::getCommand PHP Method

getCommand() public method

Returns the command for a given name.
public getCommand ( string $name ) : Command
$name string The name of the command.
return Webmozart\Console\Api\Command\Command The command.
    public function getCommand($name);

Usage Example

Example #1
0
 protected function setUp()
 {
     $config = DefaultApplicationConfig::create()->setDisplayName('The Application')->setVersion('1.2.3')->beginCommand('the-command')->end();
     $this->application = new ConsoleApplication($config);
     $this->command = $this->application->getCommand('the-command');
     $this->helpCommand = $this->application->getCommand('help');
     $this->io = new BufferedIO();
     $this->handler = new HelpXmlHandler();
 }
All Usage Examples Of Webmozart\Console\Api\Application\Application::getCommand