Kraken\Console\Client\Command\Command::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | null | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer | null | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->onStart();
        $promise = Promise::doResolve($this->command($input, $output));
        $promise->then(function ($value) {
            return $this->onSuccess($value);
        }, function ($ex) {
            return $this->onFailure($ex);
        }, function ($ex) {
            return $this->onCancel($ex);
        })->always(function () {
            $this->onStop();
        });
    }