コード例 #1
0
ファイル: SelectTest.php プロジェクト: opendi/solrclient
 public function testDefaults()
 {
     $field = "foo";
     $op = "bar";
     $select = new Select();
     $select->defaultField($field)->defaultOperator($op);
     $this->assertEquals('df=foo&q.op=bar', $select->render());
 }
コード例 #2
0
ファイル: Core.php プロジェクト: opendi/solrclient
 /**
  * Returns the path, including the query string, for a given select query.
  *
  * @param  Select $select
  *
  * @return string
  */
 public function selectPath(Select $select)
 {
     $query = $select->render();
     return "{$this->name}/select?{$query}";
 }