Kraken\Runtime\Command\Container\ContainerDestroyCommand::command PHP Метод

command() защищенный Метод

protected command ( $params = [] )
    protected function command($params = [])
    {
        $runtime = $this->runtime;
        $promise = new Promise();
        $runtime->once('destroy', function () use($promise) {
            $promise->resolve('Runtime has been destroyed');
        });
        $runtime->destroy()->then(null, function ($ex) use($promise) {
            $promise->reject($ex);
        }, function ($ex) use($promise) {
            $promise->cancel($ex);
        });
        return $promise;
    }
ContainerDestroyCommand