PHP Класс Pantheon\Terminus\Collections\Backups

Наследование: extends EnvironmentOwnedCollection
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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