PHP Interface Kraken\Console\Server\Manager\ProjectManagerInterface

显示文件 Open project: kraken-php/framework Interface Usage Examples

Public Methods

Method Description
createProject ( integer $flags = Runtime::CREATE_DEFAULT ) : Kraken\Promise\PromiseInterface Create a new project.
destroyProject ( integer $flags = Runtime::DESTROY_FORCE_SOFT ) : Kraken\Promise\PromiseInterface Destroy project.
existsProject ( ) : boolean Check if project exists.
getProjectName ( ) : string Get project Name
getProjectRoot ( ) : string Get project Root.
setProjectName ( string $name ) Set project Name.
setProjectRoot ( string $root ) Set project Root.
startProject ( ) : Kraken\Promise\PromiseInterface Start existing project.
stopProject ( ) : Kraken\Promise\PromiseInterface Stop existing project.

Method Details

createProject() public method

Flags might be one of: Runtime::CREATE_DEFAULT - creates a new project only if it does not already exist. Runtime::CREATE_FORCE_SOFT - does the same as CREATE_DEFAULT, but in case of existing project tries to replace it. Replacement is done by destroying existing project by sending shutdown message. Runtime::CREATE_FORCE_HARD - does the same as CREATE_DEFAULT, but in case of existing project tries to replace it. Replacement is done by forcefully destroying existing project. Runtime::CREATE_FORCE - creates a new project if it does not exist or tries to replace existing firstly trying to destroy it gracefully, but it fails doing it forcefully.
public createProject ( integer $flags = Runtime::CREATE_DEFAULT ) : Kraken\Promise\PromiseInterface
$flags integer
return Kraken\Promise\PromiseInterface

destroyProject() public method

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
return Kraken\Promise\PromiseInterface

existsProject() public method

Check if project exists.
public existsProject ( ) : boolean
return boolean

getProjectName() public method

Get project Name
public getProjectName ( ) : string
return string $root

getProjectRoot() public method

Get project Root.
public getProjectRoot ( ) : string
return string $root

setProjectName() public method

Set project Name.
public setProjectName ( string $name )
$name string

setProjectRoot() public method

Set project Root.
public setProjectRoot ( string $root )
$root string

startProject() public method

Start existing project.
public startProject ( ) : Kraken\Promise\PromiseInterface
return Kraken\Promise\PromiseInterface

stopProject() public method

Stop existing project.
public stopProject ( ) : Kraken\Promise\PromiseInterface
return Kraken\Promise\PromiseInterface