* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Query */ /** * Analysis document query * * @package Solarium * @subpackage Query */ class Solarium_Query_Analysis_Document extends Solarium_Query_Analysis { /** * Documents to analyze * * @var array */ protected $_documents = array(); /** * Default options * * @var array */ protected $_options = array( 'handler' => 'analysis/document', 'resultclass' => 'Solarium_Result_Analysis_Document', ); /** * Get type for this query * * @return string */ public function getType() { return Solarium_Client::QUERYTYPE_ANALYSIS_DOCUMENT; } /** * Add a single document * * @param object $document * @return Solarium_Query_Analysis_Document Provides fluent interface */ public function addDocument($document) { $this->_documents[] = $document; return $this; } /** * Add multiple documents * * @param array $documents * @return Solarium_Query_Analysis_Document fluent interface */ public function addDocuments($documents) { $this->_documents = array_merge($this->_documents, $documents); return $this; } /** * Get all documents * * @return array */ public function getDocuments() { return $this->_documents; } }