lib/Elastica/Snapshot.php
public function getSnapshot($repository, $name)
    {
        try {
            $response = $this->request($repository.'/'.$name);
        } catch (ResponseException $e) {
            if (404 == $e->getResponse()->getStatus()) {
                throw new NotFoundException("Snapshot '".$name."' does not exist in repository '".$repository."'.");
            }
            throw $e;
        }
        $data = $response->getData();

        return $data['snapshots'][0];
    }
public function getSnapshot($repository, $name)
    {
        try {
            $response = $this->request($repository.'/'.$name);
        } catch (ResponseException $e) {
            if (404 == $e->getResponse()->getStatus()) {
                throw new NotFoundException("Snapshot '".$name."' does not exist in repository '".$repository."'.");
            }
            throw $e;
        }
        $data = $response->getData();

        return $data['snapshots'][0];
    }
public function getSnapshot ( $ repository , $ name ) { try { $ response = $ this -> request ( $ repository . '/' . $ name ) ; } catch ( ResponseException $ e ) { if ( 404 == $ e -> getResponse ( ) -> getStatus ( ) ) { throw new NotFoundException ( "Snapshot '" . $ name . "' does not exist in repository '" . $ repository . "'." ) ; } throw $ e ; } $ data = $ response -> getData ( ) ; return $ data [ 'snapshots' ] [ 0 ] ; }
Retrieve data regarding a specific snapshot.

@param string $repository the name of the repository from which to retrieve the snapshot
@param string $name       the name of the desired snapshot

@throws Exception\ResponseException
@throws Exception\NotFoundException

@return array
Retrieve data regarding a specific snapshot .