PHP Class DeploymentStrategy

Inheritance: extends ViewableData
Datei anzeigen Open project: silverstripe/deploynaut Class Usage Examples

Protected Properties

Property Type Description
$actionCode string
$actionTitle string
$changes array
$environment DNEnvironment
$estimatedTime integer
$messages array
$options array
$validationCode string Validation code

Public Methods

Method Description
__construct ( DNEnvironment $environment, array $options = [] )
createDeployment ( ) : DNDeployment
fromArray ( string $data ) Load from array.
fromJSON ( string $json ) Load from JSON associative array.
getActionCode ( ) : string
getActionTitle ( ) : string
getChange ( $key ) : ArrayData | null Returns a change or a given key.
getChanges ( ) : array
getChangesModificationNeeded ( ) : array Filter the changeset where modification was not required.
getEstimatedTime ( ) : integer
getMessages ( ) : array
getOption ( string $option ) : string | null
getOptions ( ) : string
getValidationCode ( ) : string
setActionCode ( $code )
setActionTitle ( string $title )
setChange ( string $title, string $from, string $to )
setChangeDescriptionOnly ( string $title, string $desc )
setChanges ( array $data )
setEstimatedTime ( $seconds )
setMessage ( string $msg, $code = self::ERROR_CODE )
setOption ( string $option, string $value )
setValidationCode ( string $code )
toArray ( ) : array Transform the deployment strategy to an array.
toJSON ( ) : string
updateDeployment ( integer $deploymentID ) : DNDeployment

Method Details

__construct() public method

public __construct ( DNEnvironment $environment, array $options = [] )
$environment DNEnvironment
$options array

createDeployment() public method

public createDeployment ( ) : DNDeployment
return DNDeployment

fromArray() public method

Environment must be set by the callee when creating this object.
public fromArray ( string $data )
$data string

fromJSON() public method

Environment must be set by the callee when creating this object.
public fromJSON ( string $json )
$json string

getActionCode() public method

public getActionCode ( ) : string
return string

getActionTitle() public method

public getActionTitle ( ) : string
return string

getChange() public method

Returns a change or a given key.
public getChange ( $key ) : ArrayData | null
return ArrayData | null

getChanges() public method

public getChanges ( ) : array
return array Associative array of changes, e.g. array( 'SHA' => array( 'from' => 'abc', 'to' => 'def' ) )

getChangesModificationNeeded() public method

Filter the changeset where modification was not required.

getEstimatedTime() public method

public getEstimatedTime ( ) : integer
return integer Time in minutes

getMessages() public method

public getMessages ( ) : array
return array

getOption() public method

public getOption ( string $option ) : string | null
$option string
return string | null

getOptions() public method

public getOptions ( ) : string
return string

getValidationCode() public method

public getValidationCode ( ) : string
return string

setActionCode() public method

public setActionCode ( $code )

setActionTitle() public method

public setActionTitle ( string $title )
$title string

setChange() public method

public setChange ( string $title, string $from, string $to )
$title string
$from string
$to string

setChangeDescriptionOnly() public method

public setChangeDescriptionOnly ( string $title, string $desc )
$title string
$desc string

setChanges() public method

public setChanges ( array $data )
$data array

setEstimatedTime() public method

public setEstimatedTime ( $seconds )

setMessage() public method

public setMessage ( string $msg, $code = self::ERROR_CODE )
$msg string

setOption() public method

public setOption ( string $option, string $value )
$option string
$value string

setValidationCode() public method

public setValidationCode ( string $code )
$code string

toArray() public method

Transform the deployment strategy to an array.
public toArray ( ) : array
return array

toJSON() public method

public toJSON ( ) : string
return string

updateDeployment() public method

public updateDeployment ( integer $deploymentID ) : DNDeployment
$deploymentID integer
return DNDeployment

Property Details

$actionCode protected_oe property

protected string $actionCode
return string

$actionTitle protected_oe property

protected string $actionTitle
return string

$changes protected_oe property

protected array $changes
return array

$environment protected_oe property

protected DNEnvironment $environment
return DNEnvironment

$estimatedTime protected_oe property

protected int $estimatedTime
return integer

$messages protected_oe property

protected array $messages
return array

$options protected_oe property

protected array $options
return array

$validationCode protected_oe property

Validation code
protected string $validationCode
return string