PHP Класс Elastica\Snapshot

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

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

Свойство Тип Описание
$_client Client

Открытые методы

Метод Описание
__construct ( Client $client )
createSnapshot ( string $repository, string $name, array $options = [], boolean $waitForCompletion = false ) : Response Create a new snapshot.
deleteSnapshot ( string $repository, string $name ) : Response Delete a snapshot.
getAllRepositories ( ) : array Retrieve all repository records.
getAllSnapshots ( string $repository ) : array Retrieve data regarding all snapshots in the given repository.
getRepository ( string $name ) : array Retrieve a repository record by name.
getSnapshot ( string $repository, string $name ) : array Retrieve data regarding a specific snapshot.
registerRepository ( string $name, string $type, array $settings = [] ) : Response Register a snapshot repository.
request ( string $path, string $method = Request::GET, array $data = [], array $query = [] ) : Response Perform a snapshot request.
restoreSnapshot ( string $repository, string $name, array $options = [], boolean $waitForCompletion = false ) : Response Restore a snapshot.

Описание методов

__construct() публичный Метод

public __construct ( Client $client )
$client Client

createSnapshot() публичный Метод

Create a new snapshot.
public createSnapshot ( string $repository, string $name, array $options = [], boolean $waitForCompletion = false ) : Response
$repository string the name of the repository in which this snapshot should be stored
$name string the name of this snapshot
$options array optional settings for this snapshot
$waitForCompletion boolean if true, the request will not return until the snapshot operation is complete
Результат Response

deleteSnapshot() публичный Метод

Delete a snapshot.
public deleteSnapshot ( string $repository, string $name ) : Response
$repository string the repository in which the snapshot resides
$name string the name of the snapshot to be deleted
Результат Response

getAllRepositories() публичный Метод

Retrieve all repository records.
public getAllRepositories ( ) : array
Результат array

getAllSnapshots() публичный Метод

Retrieve data regarding all snapshots in the given repository.
public getAllSnapshots ( string $repository ) : array
$repository string the repository name
Результат array

getRepository() публичный Метод

Retrieve a repository record by name.
public getRepository ( string $name ) : array
$name string the name of the desired repository
Результат array

getSnapshot() публичный Метод

Retrieve data regarding a specific snapshot.
public getSnapshot ( string $repository, string $name ) : array
$repository string the name of the repository from which to retrieve the snapshot
$name string the name of the desired snapshot
Результат array

registerRepository() публичный Метод

Register a snapshot repository.
public registerRepository ( string $name, string $type, array $settings = [] ) : Response
$name string the name of the repository
$type string the repository type ("fs" for file system)
$settings array Additional repository settings. If type "fs" is used, the "location" setting must be provided.
Результат Response

request() публичный Метод

Perform a snapshot request.
public request ( string $path, string $method = Request::GET, array $data = [], array $query = [] ) : Response
$path string the URL
$method string the HTTP method
$data array request body data
$query array query string parameters
Результат Response

restoreSnapshot() публичный Метод

Restore a snapshot.
public restoreSnapshot ( string $repository, string $name, array $options = [], boolean $waitForCompletion = false ) : Response
$repository string the name of the repository
$name string the name of the snapshot
$options array options for the restore operation
$waitForCompletion boolean if true, the request will not return until the restore operation is complete
Результат Response

Описание свойств

$_client защищенное свойство

protected Client,elastica $_client
Результат Client