Kraken\Console\Server\Manager\ProjectManagerInterface::destroyProject PHP Метод

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

Flags might be one of: Runtime::DESTROY_KEEP - sets manager to not destroy project Runtime::DESTROY_FORCE_SOFT - destroys project by sending message to shutdown Runtime::DESTROY_FORCE_HARD - destroys project forcefully and immediately Runtime::DESTROY_FORCE - first, tries to gracefully destroy project by sending message to shutdown, if it does not receive answer, then closes it forcefully.
public destroyProject ( integer $flags = Runtime::DESTROY_FORCE_SOFT ) : Kraken\Promise\PromiseInterface
$flags integer
Результат Kraken\Promise\PromiseInterface
    public function destroyProject($flags = Runtime::DESTROY_FORCE_SOFT);

Usage Example

 /**
  * @override
  * @inheritDoc
  */
 protected function command($params = [])
 {
     if (!isset($params['flags'])) {
         throw new RejectionException('Invalid params.');
     }
     return $this->manager->destroyProject($params['flags'])->then(function () {
         return 'Project has been destroyed.';
     });
 }