Doctrine\ODM\MongoDB\CommandCursor::getSingleResult PHP Method

getSingleResult() public method

Rewinds the cursor and returns its first result.
See also: Iterator::getSingleResult()
public getSingleResult ( ) : object | array | null
return object | array | null
    public function getSingleResult()
    {
        return $this->hydrateDocument($this->commandCursor->getSingleResult());
    }