PHP Class REBELinBLUE\Deployer\Project

Inheritance: extends REBELinBLUE\Deployer\ProjectRelation, implements Robbo\Presenter\PresentableInterface, use trait Illuminate\Database\Eloquent\SoftDeletes, use trait REBELinBLUE\Deployer\Traits\BroadcastChanges
Show file Open project: rebelinblue/deployer Class Usage Examples

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.
$checkurlStatus array The check url's status count.
$dates array The fields which should be treated as Carbon instances.
$fillable array The attributes that are mass assignable.
$heartbeatStatus array The heart beats status count.
$hidden array The attributes excluded from the model's JSON form.

Public Methods

Method Description
accessDetails ( ) : array Parses the repository URL to get the user, domain, port and path parts.
applicationCheckUrlStatus ( ) : array Count the application url check status.
boot ( ) Override the boot method to bind model event listeners.
branches ( ) : array Gets the list of all branches for the project which are not the default.
checkUrls ( ) : CheckUrl Has many urls to check.
deployments ( ) : Deployment Has many relationship.
generateHash ( ) Generates a hash for use in the webhook URL.
getBranchUrlAttribute ( string $alternative = null ) : string | false Gets the HTTP URL to the branch.
getGroupNameAttribute ( ) : string Define a accessor for the group name.
getPresenter ( ) : ProjectPresenter Gets the view presenter.
getRepositoryPathAttribute ( ) : string | false Gets the repository path.
getRepositoryUrlAttribute ( ) : string | false Gets the HTTP URL to the repository.
getWebhookUrlAttribute ( ) : string Define an accessor for the webhook URL.
group ( ) : Group Belongs to relationship.
heartbeats ( ) : Heartbeat Has many relationship.
heartbeatsStatus ( ) : array Count the missed heartbeat.
isDeploying ( ) : boolean Determines whether the project is currently being deployed.
mirrorPath ( ) : string Generate a friendly path for the mirror of the repository.
notifications ( ) : Notification Has many relationship.
notifyEmails ( ) : SharedFile Has many relationship.
refs ( ) : Illuminate\Database\Eloquent\Relations\HasMany Has many relationship for git references.
servers ( ) : Server Has many relationship.
tags ( ) : Collection Gets the list of all tags for the project.

Protected Methods

Method Description
generateSSHKey ( ) Generates an SSH key and sets the private/public key properties.
regeneratePublicKey ( ) Generates an SSH key and sets the private/public key properties.

Method Details

accessDetails() public method

Parses the repository URL to get the user, domain, port and path parts.
public accessDetails ( ) : array
return array

applicationCheckUrlStatus() public method

Count the application url check status.
public applicationCheckUrlStatus ( ) : array
return array

boot() public static method

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

branches() public method

Gets the list of all branches for the project which are not the default.
public branches ( ) : array
return array

checkUrls() public method

Has many urls to check.
public checkUrls ( ) : CheckUrl
return CheckUrl

deployments() public method

Has many relationship.
public deployments ( ) : Deployment
return Deployment

generateHash() public method

Generates a hash for use in the webhook URL.
public generateHash ( )

generateSSHKey() protected method

Generates an SSH key and sets the private/public key properties.
protected generateSSHKey ( )

getBranchUrlAttribute() public method

Gets the HTTP URL to the branch.
See also: Project::accessDetails()
public getBranchUrlAttribute ( string $alternative = null ) : string | false
$alternative string
return string | false

getGroupNameAttribute() public method

Define a accessor for the group name.
public getGroupNameAttribute ( ) : string
return string

getPresenter() public method

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

getRepositoryPathAttribute() public method

Gets the repository path.
See also: Project::accessDetails()
public getRepositoryPathAttribute ( ) : string | false
return string | false

getRepositoryUrlAttribute() public method

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

getWebhookUrlAttribute() public method

Define an accessor for the webhook URL.
public getWebhookUrlAttribute ( ) : string
return string

group() public method

Belongs to relationship.
public group ( ) : Group
return Group

heartbeats() public method

Has many relationship.
public heartbeats ( ) : Heartbeat
return Heartbeat

heartbeatsStatus() public method

Count the missed heartbeat.
public heartbeatsStatus ( ) : array
return array

isDeploying() public method

Determines whether the project is currently being deployed.
public isDeploying ( ) : boolean
return boolean

mirrorPath() public method

Use the repository rather than the project ID, so if a single repo is used in multiple projects it is not duplicated.
public mirrorPath ( ) : string
return string

notifications() public method

Has many relationship.
public notifications ( ) : Notification
return Notification

notifyEmails() public method

Has many relationship.
public notifyEmails ( ) : SharedFile
return SharedFile

refs() public method

Has many relationship for git references.
See also: Project::tags()
See also: Project::branches()
public refs ( ) : Illuminate\Database\Eloquent\Relations\HasMany
return Illuminate\Database\Eloquent\Relations\HasMany

regeneratePublicKey() protected method

Generates an SSH key and sets the private/public key properties.
protected regeneratePublicKey ( )

servers() public method

Has many relationship.
public servers ( ) : Server
return Server

tags() public method

Gets the list of all tags for the project.
public tags ( ) : Collection
return Illuminate\Support\Collection

Property Details

$appends protected property

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

$casts protected property

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

$checkurlStatus protected property

The check url's status count.
protected array $checkurlStatus
return array

$dates protected property

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

$fillable protected property

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

$heartbeatStatus protected property

The heart beats status count.
protected array $heartbeatStatus
return array

$hidden protected property

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