Neos\Flow\Persistence\Doctrine\QueryResult::getFirst PHP Méthode

getFirst() public méthode

Returns the first object in the result set
public getFirst ( ) : object
Résultat object
    public function getFirst()
    {
        if (is_array($this->rows)) {
            $rows =& $this->rows;
        } else {
            $query = clone $this->query;
            $query->setLimit(1);
            $rows = $query->getResult();
        }
        return isset($rows[0]) ? $rows[0] : null;
    }