diff options
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Filter/Type.php')
-rw-r--r-- | vendor/ruflin/elastica/lib/Elastica/Filter/Type.php | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Filter/Type.php b/vendor/ruflin/elastica/lib/Elastica/Filter/Type.php index 8fb58c7d..f9c17813 100644 --- a/vendor/ruflin/elastica/lib/Elastica/Filter/Type.php +++ b/vendor/ruflin/elastica/lib/Elastica/Filter/Type.php @@ -1,42 +1,40 @@ <?php - namespace Elastica\Filter; /** - * Type Filter + * Type Filter. * - * @category Xodoa - * @package Elastica * @author James Wilson <jwilson556@gmail.com> - * @link http://www.elasticsearch.org/guide/reference/query-dsl/type-filter.html + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-type-filter.html */ class Type extends AbstractFilter { /** - * Type name + * Type name. * * @var string */ protected $_type = null; /** - * Construct Type Filter + * Construct Type Filter. * - * @param string $typeName Type name - * @return \Elastica\Filter\Type + * @param string $type Type name */ - public function __construct($typeName = null) + public function __construct($type = null) { - if ($typeName) { - $this->setType($typeName); + if ($type) { + $this->setType($type); } } /** - * Ads a field with arguments to the range query + * Ads a field with arguments to the range query. * - * @param string $typeName Type name - * @return \Elastica\Filter\Type current object + * @param string $typeName Type name + * + * @return $this */ public function setType($typeName) { @@ -46,15 +44,16 @@ class Type extends AbstractFilter } /** - * Convert object to array + * Convert object to array. * * @see \Elastica\Filter\AbstractFilter::toArray() + * * @return array Filter array */ public function toArray() { return array( - 'type' => array('value' => $this->_type) + 'type' => array('value' => $this->_type), ); } } |