PHP Class Pantheon\Terminus\Models\Backup

Inheritance: extends TerminusModel, implements Robo\Contract\ConfigAwareInterface, use trait Robo\Common\ConfigAwareTrait
Show file Open project: pantheon-systems/terminus Class Usage Examples

Public Properties

Property Type Description
$environment environment

Public Methods

Method Description
__construct ( $attributes, array $options = [] )
backupIsFinished ( ) : boolean Determines whether the backup has been completed or not
getBucket ( ) : string Returns the bucket name for this backup
getDate ( ) : string Returns the date the backup was completed
getInitiator ( ) : string Returns the type of initiator of the backup
getSizeInMb ( ) : string Returns the size of the backup in MB
getUrl ( ) : string Gets the URL of a backup
restore ( ) : Workflow Restores this backup

Protected Methods

Method Description
parseAttributes ( $data )

Method Details

__construct() public method

public __construct ( $attributes, array $options = [] )
$options array

backupIsFinished() public method

Determines whether the backup has been completed or not
public backupIsFinished ( ) : boolean
return boolean True if backup is completed.

getBucket() public method

Returns the bucket name for this backup
public getBucket ( ) : string
return string

getDate() public method

Returns the date the backup was completed
public getDate ( ) : string
return string Timestamp completion time or "Pending"

getInitiator() public method

Returns the type of initiator of the backup
public getInitiator ( ) : string
return string Either "manual" or "automated"

getSizeInMb() public method

Returns the size of the backup in MB
public getSizeInMb ( ) : string
return string A number (an integer or a float) followed by 'MB'.

getUrl() public method

Gets the URL of a backup
public getUrl ( ) : string
return string

parseAttributes() protected method

protected parseAttributes ( $data )

restore() public method

Restores this backup
public restore ( ) : Workflow
return Workflow

Property Details

$environment public property

public environment $environment
return environment