Esempio n. 1
0
 /**
  * Set the query string
  *
  * This overwrites the current value
  *
  * @param string $query
  * @param array $bind Bind values for placeholders in the query string
  * @return Solarium_Query_Select_Facet_Query Provides fluent interface
  */
 public function setQuery($query, $bind = null)
 {
     if (!is_null($bind)) {
         $helper = new Solarium_Query_Helper();
         $query = $helper->assemble($query, $bind);
     }
     return $this->_setOption('query', $query);
 }
Esempio n. 2
0
 /**
  * Set the query string
  *
  * This overwrites the current value
  *
  * @param string $query
  * @param array $bind Bind values for placeholders in the query string
  * @return Solarium_Query Provides fluent interface
  */
 public function setQuery($query, $bind = null)
 {
     if (!is_null($bind)) {
         $helper = new Solarium_Query_Helper();
         $query = $helper->assemble($query, $bind);
     }
     $this->_query = trim($query);
     return $this;
 }
Esempio n. 3
0
 public function testAssembleInvalidPartNumber()
 {
     $this->setExpectedException('Solarium_Exception');
     $this->_helper->assemble('cat:%1% AND content:%2%', array('value1'));
 }