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.
Example #1
0
 public function testFirstNoResults()
 {
     $result = new Result(array(), 0);
     $doc = $result->first();
     $this->assertFalse($doc);
 }