diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:31:33 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:31:33 -0400 |
commit | 150f94f051128f367bc89f6b7e5f57eb2a69fc62 (patch) | |
tree | 181f454813b310ee97385058c6c6f2e3f34d5fd8 /vendor/ruflin/elastica/lib/Elastica/Suggest/AbstractSuggest.php | |
parent | 7e85254903c7c0cb49e381f16b18441ea7b058cc (diff) | |
parent | 80f7dc77d430774192b929d780f96260066df2ee (diff) |
Merge commit '80f7dc'
# Conflicts:
# extensions/ArchInterWiki.sql
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Suggest/AbstractSuggest.php')
-rw-r--r-- | vendor/ruflin/elastica/lib/Elastica/Suggest/AbstractSuggest.php | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Suggest/AbstractSuggest.php b/vendor/ruflin/elastica/lib/Elastica/Suggest/AbstractSuggest.php deleted file mode 100644 index e5f5e01c..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Suggest/AbstractSuggest.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -namespace Elastica\Suggest; - - -use Elastica\Param; - -/** - * Class AbstractSuggestion - * @package Elastica\Suggest - */ -abstract class AbstractSuggest extends Param -{ - /** - * @var string the name of this suggestion - */ - protected $_name; - - /** - * @var string the text for this suggestion - */ - protected $_text; - - /** - * @param string $name - * @param string $field - */ - public function __construct($name, $field) - { - $this->_name = $name; - $this->setField($field); - } - - /** - * Suggest text must be set either globally or per suggestion - * @param string $text - * @return \Elastica\Suggest\AbstractSuggest - */ - public function setText($text) - { - $this->_text = $text; - return $this; - } - - /** - * @param string $field - * @return \Elastica\Suggest\AbstractSuggest - */ - public function setField($field) - { - return $this->setParam("field", $field); - } - - /** - * @param int $size - * @return \Elastica\Suggest\AbstractSuggest - */ - public function setSize($size) - { - return $this->setParam("size", $size); - } - - /** - * @param int $size maximum number of suggestions to be retrieved from each shard - * @return \Elastica\Suggest\AbstractSuggest - */ - public function setShardSize($size) - { - return $this->setParam("shard_size", $size); - } - - /** - * Retrieve the name of this suggestion - * @return string - */ - public function getName() - { - return $this->_name; - } - - /** - * @return array - */ - public function toArray() - { - $array = parent::toArray(); - if (isset($this->_text)) { - $array['text'] = $this->_text; - } - return $array; - } -}
\ No newline at end of file |