lib/Elastica/Snapshot.php
public function createSnapshot($repository, $name, $options = [], $waitForCompletion = false)
    {
        return $this->request($repository.'/'.$name, Request::PUT, $options, ['wait_for_completion' => $waitForCompletion]);
    }
public function createSnapshot($repository, $name, $options = [], $waitForCompletion = false)
    {
        return $this->request($repository.'/'.$name, Request::PUT, $options, ['wait_for_completion' => $waitForCompletion]);
    }
public function createSnapshot ( $ repository , $ name , $ options = [ ] , $ waitForCompletion = false ) { return $ this -> request ( $ repository . '/' . $ name , Request :: PUT , $ options , [ 'wait_for_completion' => $ waitForCompletion ] ) ; }
Create a new snapshot.

@param string $repository        the name of the repository in which this snapshot should be stored
@param string $name              the name of this snapshot
@param array  $options           optional settings for this snapshot
@param bool   $waitForCompletion if true, the request will not return until the snapshot operation is complete

@return Response
Create a new snapshot .