PHP Class Kraken\Console\Server\Manager\ProjectManager

Inheritance: implements Kraken\Console\Server\Manager\ProjectManagerInterface
Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$channel Kraken\Channel\ChannelInterface
$data mixed
$fs Kraken\Filesystem\FilesystemInterface
$fsPath string
$projectName string
$projectRoot string
$runtime Kraken\Runtime\RuntimeContainerInterface
$scriptRoot string
$system Kraken\Util\System\SystemInterface

Public Methods

Method Description
__construct ( Kraken\Runtime\RuntimeContainerInterface $runtime, Kraken\Channel\ChannelInterface $channel, Kraken\Util\System\SystemInterface $system, Kraken\Filesystem\FilesystemInterface $fs )
__destruct ( )
allocateProject ( string $alias, string $name, string $pid ) : boolean Allocate project data.
createProject ( $flags = Runtime::CREATE_DEFAULT )
destroyProject ( $flags = Runtime::DESTROY_FORCE_SOFT )
existsProject ( )
freeProject ( ) : boolean Flush project data.
getProjectName ( )
getProjectRoot ( )
setProjectName ( $name )
setProjectRoot ( $root )
startProject ( )
stopProject ( )

Protected Methods

Method Description
createRequest ( Kraken\Channel\ChannelInterface $channel, string $receiver, string $command ) : Request Create Request.

Private Methods

Method Description
getEmptyStorage ( )
phpCommand ( string $command, string[] $params = [] ) : string Run external PHP script.
selectFromStorage ( ) : mixed Copy data from persistent storage to temporary one.
updateStorage ( string[] $with = [] ) Copy temporary project data to persistent storage.

Method Details

__construct() public method

public __construct ( Kraken\Runtime\RuntimeContainerInterface $runtime, Kraken\Channel\ChannelInterface $channel, Kraken\Util\System\SystemInterface $system, Kraken\Filesystem\FilesystemInterface $fs )
$runtime Kraken\Runtime\RuntimeContainerInterface
$channel Kraken\Channel\ChannelInterface
$system Kraken\Util\System\SystemInterface
$fs Kraken\Filesystem\FilesystemInterface

__destruct() public method

public __destruct ( )

allocateProject() public method

Allocate project data.
public allocateProject ( string $alias, string $name, string $pid ) : boolean
$alias string
$name string
$pid string
return boolean

createProject() public method

public createProject ( $flags = Runtime::CREATE_DEFAULT )

createRequest() protected method

Create Request.
protected createRequest ( Kraken\Channel\ChannelInterface $channel, string $receiver, string $command ) : Request
$channel Kraken\Channel\ChannelInterface
$receiver string
$command string
return Kraken\Channel\Extra\Request

destroyProject() public method

public destroyProject ( $flags = Runtime::DESTROY_FORCE_SOFT )

existsProject() public method

public existsProject ( )

freeProject() public method

Flush project data.
public freeProject ( ) : boolean
return boolean

getProjectName() public method

public getProjectName ( )

getProjectRoot() public method

public getProjectRoot ( )

setProjectName() public method

public setProjectName ( $name )

setProjectRoot() public method

public setProjectRoot ( $root )

startProject() public method

public startProject ( )

stopProject() public method

public stopProject ( )

Property Details

$channel protected property

protected ChannelInterface,Kraken\Channel $channel
return Kraken\Channel\ChannelInterface

$data protected property

protected mixed $data
return mixed

$fs protected property

protected FilesystemInterface,Kraken\Filesystem $fs
return Kraken\Filesystem\FilesystemInterface

$fsPath protected property

protected string $fsPath
return string

$projectName protected property

protected string $projectName
return string

$projectRoot protected property

protected string $projectRoot
return string

$runtime protected property

protected RuntimeContainerInterface,Kraken\Runtime $runtime
return Kraken\Runtime\RuntimeContainerInterface

$scriptRoot protected property

protected string $scriptRoot
return string

$system protected property

protected SystemInterface,Kraken\Util\System $system
return Kraken\Util\System\SystemInterface