PHP Class REBELinBLUE\Deployer\Deployment

Inheritance: extends Illuminate\Database\Eloquent\Model, implements Robbo\Presenter\PresentableInterface, implements REBELinBLUE\Deployer\Contracts\RuntimeInterface, use trait Illuminate\Database\Eloquent\SoftDeletes
ファイルを表示 Open project: rebelinblue/deployer Class Usage Examples

Public Properties

Property Type Description
$currentDeployment

Protected Properties

Property Type Description
$appends array Additional attributes to include in the JSON representation.
$casts array The attributes that should be casted to native types.
$dates array The fields which should be tried as Carbon instances.
$fillable array The attributes that are mass assignable.
$hidden array The attributes excluded from the model's JSON form.

Public Methods

Method Description
boot ( ) Override the boot method to bind model event listeners.
getBranchURLAttribute ( ) : string | false Gets the HTTP URL to the branch.
getCommandsAttribute ( ) : Collection Define a command attribute to be able to access to commands relationship.
getCommitUrlAttribute ( ) : string | false Gets the HTTP URL to the commit.
getDeployerNameAttribute ( ) : string Define a accessor for the deployer name.
getPresenter ( ) : DeploymentPresenter Gets the view presenter.
getProjectNameAttribute ( ) : string Define a accessor for the project name.
getReleaseIdAttribute ( ) : string Mutator to get the release ID.
getRepoFailureAttribute ( ) : boolean Checks whether the repository failed to load.
getShortCommitAttribute ( ) : string Gets the short commit hash.
isAborted ( ) : boolean Determines whether the deployment is aborted.
isAborting ( ) : boolean Determines whether the deployment is waiting to be aborted.
isCurrent ( ) : boolean Determines if the deployment is the latest deployment.
isFailed ( ) : boolean Determines whether the deployment failed.
isPending ( ) : boolean Determines whether the deployment is pending.
isRunning ( ) : boolean Determines whether the deployment is running.
isSuccessful ( ) : boolean Determines whether the deployment is successful.
notificationPayload ( ) : array Generates a slack payload for the deployment.
project ( ) : BelongsTo Belongs to relationship.
runtime ( ) : false | integer Determines how long the deploy took.
steps ( ) : Illuminate\Database\Eloquent\Relations\HasMany Has many relationship.
user ( ) : BelongsTo Belongs to relationship.

Private Methods

Method Description
loadCommands ( ) Query the DB and load the HasMany relationship for commands.

Method Details

boot() public static method

Override the boot method to bind model event listeners.
public static boot ( )

getBranchURLAttribute() public method

Gets the HTTP URL to the branch.
See also: Project::accessDetails()
public getBranchURLAttribute ( ) : string | false
return string | false

getCommandsAttribute() public method

Define a command attribute to be able to access to commands relationship.
public getCommandsAttribute ( ) : Collection
return Illuminate\Support\Collection

getCommitUrlAttribute() public method

Gets the HTTP URL to the commit.
public getCommitUrlAttribute ( ) : string | false
return string | false

getDeployerNameAttribute() public method

Define a accessor for the deployer name.
public getDeployerNameAttribute ( ) : string
return string

getPresenter() public method

Gets the view presenter.
public getPresenter ( ) : DeploymentPresenter
return REBELinBLUE\Deployer\Presenters\DeploymentPresenter

getProjectNameAttribute() public method

Define a accessor for the project name.
public getProjectNameAttribute ( ) : string
return string

getReleaseIdAttribute() public method

Mutator to get the release ID.
public getReleaseIdAttribute ( ) : string
return string

getRepoFailureAttribute() public method

Checks whether the repository failed to load.

getShortCommitAttribute() public method

Gets the short commit hash.
public getShortCommitAttribute ( ) : string
return string

isAborted() public method

Determines whether the deployment is aborted.
public isAborted ( ) : boolean
return boolean

isAborting() public method

Determines whether the deployment is waiting to be aborted.
public isAborting ( ) : boolean
return boolean

isCurrent() public method

Determines if the deployment is the latest deployment.
public isCurrent ( ) : boolean
return boolean

isFailed() public method

Determines whether the deployment failed.
public isFailed ( ) : boolean
return boolean

isPending() public method

Determines whether the deployment is pending.
public isPending ( ) : boolean
return boolean

isRunning() public method

Determines whether the deployment is running.
public isRunning ( ) : boolean
return boolean

isSuccessful() public method

Determines whether the deployment is successful.
public isSuccessful ( ) : boolean
return boolean

notificationPayload() public method

Generates a slack payload for the deployment.
public notificationPayload ( ) : array
return array

project() public method

Belongs to relationship.
public project ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

runtime() public method

Determines how long the deploy took.
public runtime ( ) : false | integer
return false | integer False if the deploy is still running, otherwise the runtime in seconds

steps() public method

Has many relationship.
public steps ( ) : Illuminate\Database\Eloquent\Relations\HasMany
return Illuminate\Database\Eloquent\Relations\HasMany

user() public method

Belongs to relationship.
public user ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

Property Details

$appends protected_oe property

Additional attributes to include in the JSON representation.
protected array $appends
return array

$casts protected_oe property

The attributes that should be casted to native types.
protected array $casts
return array

$currentDeployment public_oe static_oe property

public static $currentDeployment

$dates protected_oe property

The fields which should be tried as Carbon instances.
protected array $dates
return array

$fillable protected_oe property

The attributes that are mass assignable.
protected array $fillable
return array

$hidden protected_oe property

The attributes excluded from the model's JSON form.
protected array $hidden
return array