PHP 클래스 Pantheon\Terminus\Collections\Backups

상속: extends EnvironmentOwnedCollection
파일 보기 프로젝트 열기: pantheon-systems/terminus 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$collected_class string
$url string

공개 메소드들

메소드 설명
cancelBackupSchedule ( ) Cancels an environment's regular backup schedule
create ( array $arg_options = [] ) : Workflow Creates a backup
fetch ( array $options = [] ) : TerminusCollection Fetches model data from API and instantiates its model instances
getBackupByFileName ( string $filename ) : Backup Fetches backup for a specified filename
getBackupSchedule ( ) : array Retrieves an environment's regular backup schedule
getBackupsByElement ( string $element = null ) : Backup[] Lists all backups for a specific element.
getFinishedBackups ( string $element = null ) : Backup[] Filters the backups for only ones which have finished
getValidElements ( ) : string[] Valid backup types
setBackupSchedule ( array $options = ['day' => null, 'hour' => null] ) : Workflow Sets an environment's regular backup schedule

보호된 메소드들

메소드 설명
getDayNumber ( string $day ) : integer Retrieve an integer representing a the day of the week

메소드 상세

cancelBackupSchedule() 공개 메소드

Cancels an environment's regular backup schedule

create() 공개 메소드

Creates a backup
public create ( array $arg_options = [] ) : Workflow
$arg_options array Elements as follow: integer keep-for Days to keep the backup for string element Which element of the site to back up (database, code, files, or null for all)
리턴 Workflow

fetch() 공개 메소드

Fetches model data from API and instantiates its model instances
public fetch ( array $options = [] ) : TerminusCollection
$options array params to pass configure fetching array $data Data to fill in the model members of this collection
리턴 TerminusCollection $this

getBackupByFileName() 공개 메소드

Fetches backup for a specified filename
public getBackupByFileName ( string $filename ) : Backup
$filename string Name of the file name to filter by
리턴 Backup

getBackupSchedule() 공개 메소드

Retrieves an environment's regular backup schedule
public getBackupSchedule ( ) : array
리턴 array $schedule Elements as follows: - daily_backup_time: string - weekly_backup_day: string

getBackupsByElement() 공개 메소드

Lists all backups for a specific element.
public getBackupsByElement ( string $element = null ) : Backup[]
$element string Name of the element type to filter by
리턴 Backup[]

getDayNumber() 보호된 메소드

Retrieve an integer representing a the day of the week
protected getDayNumber ( string $day ) : integer
$day string The day of the week
리턴 integer 0 = Sunday, 6 = Saturday

getFinishedBackups() 공개 메소드

Filters the backups for only ones which have finished
public getFinishedBackups ( string $element = null ) : Backup[]
$element string Element requested (i.e. code, db, or files)
리턴 Backup[] An array of Backup objects

getValidElements() 공개 메소드

Valid backup types
public getValidElements ( ) : string[]
리턴 string[] An array of valid elements

setBackupSchedule() 공개 메소드

Sets an environment's regular backup schedule
public setBackupSchedule ( array $options = ['day' => null, 'hour' => null] ) : Workflow
$options array Elements as follow: string day A day of the week integer hour Hour of the day to run the backups at, 0 = 00:00 23 = 23:00
리턴 Workflow

프로퍼티 상세

$collected_class 보호되어 있는 프로퍼티

protected string $collected_class
리턴 string

$url 보호되어 있는 프로퍼티

protected string $url
리턴 string