lib/Elastica/IndexTemplate.php 1 location
|
@@ 37-45 (lines=9) @@
|
| 34 |
|
* |
| 35 |
|
* @throws \Elastica\Exception\InvalidException |
| 36 |
|
*/ |
| 37 |
|
public function __construct(Client $client, $name) |
| 38 |
|
{ |
| 39 |
|
$this->_client = $client; |
| 40 |
|
|
| 41 |
|
if (!is_scalar($name)) { |
| 42 |
|
throw new InvalidException('Index template should be a scalar type'); |
| 43 |
|
} |
| 44 |
|
$this->_name = (string) $name; |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
/** |
| 48 |
|
* Deletes the index template. |
lib/Elastica/Index.php 1 location
|
@@ 58-66 (lines=9) @@
|
| 55 |
|
* @param \Elastica\Client $client Client object |
| 56 |
|
* @param string $name Index name |
| 57 |
|
*/ |
| 58 |
|
public function __construct(Client $client, $name) |
| 59 |
|
{ |
| 60 |
|
$this->_client = $client; |
| 61 |
|
|
| 62 |
|
if (!is_scalar($name)) { |
| 63 |
|
throw new InvalidException('Index name should be a scalar type'); |
| 64 |
|
} |
| 65 |
|
$this->_name = (string) $name; |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
/** |
| 69 |
|
* Returns a type object for the current index with the given name. |