public function __construct() { parent::__construct(); $command = new \FooCommand(); $this->add($command); $this->setDefaultCommand($command->getName()); }