Elastica\Index::__construct PHP Method

__construct() public method

All the communication to and from an index goes of this object
public __construct ( Client $client, string $name )
$client Client Client object
$name string Index name
    public function __construct(Client $client, $name)
    {
        $this->_client = $client;
        if (!is_scalar($name)) {
            throw new InvalidException('Index name should be a scalar type');
        }
        $this->_name = (string) $name;
    }