/** * * @return Twm_Service_Solr_Search_Query */ public function getQuery() { if (null === $this->_query) { $query = new Twm_Service_Solr_Search_Query(); $query->setParams($this->getQueryParams()); $this->_query = $query; } return $this->_query; }
protected function _get($path, Twm_Service_Solr_Search_Query $query) { if ($this->_core) { $path = "/solr/{$this->_core}/{$path}"; } else { $path = "/solr/{$path}"; } $uri = "http://{$this->getHost()}:{$this->getPort()}{$path}"; $query->setWriterType($this->getResponseWriter()); $uri .= "?" . $query->toUriParams(); $client = self::getHttpClient(); $client->setUri($uri); $client->setConfig(array('useragent' => $this->getUserAgent())); $client->setHeaders(array('Host' => $this->getHost())); $client->setMethod(Zend_Http_Client::GET); $response = $client->request(); return $response; }