PHP Class Deployer\Task\Task

Datei anzeigen Open project: elfet/deployer Class Usage Examples

Public Methods

Method Description
__construct ( string $name, callable $callback = null )
addAfter ( string $task )
addBefore ( string $task )
desc ( string $description ) : Task Set task description.
getAfter ( ) : string[] Get after tasks names.
getBefore ( ) : string[] Get before tasks names.
getDescription ( ) : string
getName ( ) : string
getOnlyForStage ( ) : array
getOnlyOn ( ) : array
isForStages ( $stages ) : boolean Decide to run or not to run for these stages.
isOnServer ( string $serverName ) : boolean Decide to run or not to run on this server.
isOnce ( ) : boolean
isPrivate ( ) : boolean
once ( ) : Task Set this task local and run only once.
onlyForStage ( array | string $stages = [] ) : Task Indicate for which stages this task should be run.
onlyOn ( array | string $servers = [] ) : Task
run ( Deployer\Task\Context $context ) Run task.
setPrivate ( ) : Task Mark task as private.

Method Details

__construct() public method

public __construct ( string $name, callable $callback = null )
$name string Tasks name
$callback callable Task code.

addAfter() public method

public addAfter ( string $task )
$task string

addBefore() public method

public addBefore ( string $task )
$task string

desc() public method

Set task description.
public desc ( string $description ) : Task
$description string
return Task

getAfter() public method

Get after tasks names.
public getAfter ( ) : string[]
return string[]

getBefore() public method

Get before tasks names.
public getBefore ( ) : string[]
return string[]

getDescription() public method

public getDescription ( ) : string
return string

getName() public method

public getName ( ) : string
return string

getOnlyForStage() public method

public getOnlyForStage ( ) : array
return array

getOnlyOn() public method

public getOnlyOn ( ) : array
return array

isForStages() public method

Decide to run or not to run for these stages.
public isForStages ( $stages ) : boolean
$stages
return boolean

isOnServer() public method

Decide to run or not to run on this server.
public isOnServer ( string $serverName ) : boolean
$serverName string
return boolean

isOnce() public method

public isOnce ( ) : boolean
return boolean

isPrivate() public method

public isPrivate ( ) : boolean
return boolean

once() public method

Set this task local and run only once.
public once ( ) : Task
return Task

onlyForStage() public method

Indicate for which stages this task should be run.
public onlyForStage ( array | string $stages = [] ) : Task
$stages array | string
return Task

onlyOn() public method

public onlyOn ( array | string $servers = [] ) : Task
$servers array | string
return Task

run() public method

Run task.
public run ( Deployer\Task\Context $context )
$context Deployer\Task\Context

setPrivate() public method

Mark task as private.
public setPrivate ( ) : Task
return Task