PHP Class Elastica\IndexTemplate

Mostrar archivo Open project: ruflin/elastica Class Usage Examples

Protected Properties

Property Type Description
$_client Client object.
$_name Index template name.

Public Methods

Method 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 method

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

create() public method

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

delete() public method

Deletes the index template.
public delete ( ) : Response
return Response Response object

exists() public method

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

getClient() public method

Returns index template client.
public getClient ( ) : Client
return Client Index client object

getName() public method

Returns the index template name.
public getName ( ) : string
return string Index name

request() public method

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
return Response Response object

Property Details

$_client protected_oe property

Client object.
protected $_client

$_name protected_oe property

Index template name.
protected $_name