* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Query */ /** * Base class for Analysis queries * * @package Solarium * @subpackage Query */ abstract class Solarium_Query_Analysis extends Solarium_Query { /** * Set the query string * * When present, the text that will be analyzed. The analysis will mimic the query-time analysis. * * @param string $query * @param array $bind Optional bind values for placeholders in the query string * @return Solarium_Query_Analysis Provides fluent interface */ public function setQuery($query, $bind = null) { if (!is_null($bind)) { $query = $this->getHelper()->assemble($query, $bind); } return $this->_setOption('query', trim($query)); } /** * Get the query string * * @return string */ public function getQuery() { return $this->getOption('query'); } /** * Set the showmatch option * * @param boolean $show * @return Solarium_Query_Analysis Provides fluent interface */ public function setShowMatch($show) { return $this->_setOption('showmatch', $show); } /** * Get the showmatch option * * @return mixed */ public function getShowMatch() { return $this->getOption('showmatch'); } }