PHP Class Elastica\IndexTemplate

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

Protected Properties

Свойство Type Description
$_client Client object.
$_name Index template name.

Méthodes publiques

Méthode Description
__construct ( Client $client, string $name ) Creates a new index template object.
create ( array $args = [] ) : Response Creates a new index template with the given arguments.
delete ( ) : Response Deletes the index template.
exists ( ) : boolean Checks if the given index template is already created.
getClient ( ) : Client Returns index template client.
getName ( ) : string Returns the index template name.
request ( string $method, array $data = [] ) : Response Makes calls to the elasticsearch server based on this index template name.

Method Details

__construct() public méthode

Creates a new index template object.
public __construct ( Client $client, string $name )
$client Client Client object
$name string Index template name

create() public méthode

Creates a new index template with the given arguments.
public create ( array $args = [] ) : Response
$args array OPTIONAL Arguments to use
Résultat Response

delete() public méthode

Deletes the index template.
public delete ( ) : Response
Résultat Response Response object

exists() public méthode

Checks if the given index template is already created.
public exists ( ) : boolean
Résultat boolean True if index exists

getClient() public méthode

Returns index template client.
public getClient ( ) : Client
Résultat Client Index client object

getName() public méthode

Returns the index template name.
public getName ( ) : string
Résultat string Index name

request() public méthode

Makes calls to the elasticsearch server based on this index template name.
public request ( string $method, array $data = [] ) : Response
$method string Rest method to use (GET, POST, DELETE, PUT)
$data array OPTIONAL Arguments as array
Résultat Response Response object

Property Details

$_client protected_oe property

Client object.
protected $_client

$_name protected_oe property

Index template name.
protected $_name