PHP Class Elastica\Snapshot

Afficher le fichier Open project: ruflin/elastica Class Usage Examples

Protected Properties

Свойство Type Description
$_client Client

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

public __construct ( Client $client )
$client Client

createSnapshot() public méthode

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
Résultat Response

deleteSnapshot() public méthode

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
Résultat Response

getAllRepositories() public méthode

Retrieve all repository records.
public getAllRepositories ( ) : array
Résultat array

getAllSnapshots() public méthode

Retrieve data regarding all snapshots in the given repository.
public getAllSnapshots ( string $repository ) : array
$repository string the repository name
Résultat array

getRepository() public méthode

Retrieve a repository record by name.
public getRepository ( string $name ) : array
$name string the name of the desired repository
Résultat array

getSnapshot() public méthode

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
Résultat array

registerRepository() public méthode

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.
Résultat Response

request() public méthode

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
Résultat Response

restoreSnapshot() public méthode

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
Résultat Response

Property Details

$_client protected_oe property

protected Client,elastica $_client
Résultat Client