first() public method

Gets the first document from the result.
public first ( ) : mixed
return mixed The first document, or false if the result is empty.
コード例 #1
0
ファイル: ResultTest.php プロジェクト: jamesmoss/flywheel
 public function testFirstNoResults()
 {
     $result = new Result(array(), 0);
     $doc = $result->first();
     $this->assertFalse($doc);
 }