| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace Elasticsearch\Endpoints\Indices\Alias;
- use Elasticsearch\Common\Exceptions\InvalidArgumentException;
- use Elasticsearch\Endpoints\AbstractEndpoint;
- /**
- * Class AbstractAliasEndpoint
- *
- * @category Elasticsearch
- * @package Elasticsearch\Endpoints\Indices\Alias
- * @author Zachary Tong <zach@elastic.co>
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
- * @link http://elastic.co
- */
- abstract class AbstractAliasEndpoint extends AbstractEndpoint
- {
- /** @var null|string */
- protected $name = null;
- /**
- * @param $name
- *
- * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException
- *
- * @return $this
- */
- public function setName($name)
- {
- if (is_string($name) !== true) {
- throw new InvalidArgumentException('Name must be a string');
- }
- $this->name = urlencode($name);
- return $this;
- }
- }
|