Neos\Flow\Persistence\Doctrine\QueryResult::getFirst PHP 메소드

getFirst() 공개 메소드

Returns the first object in the result set
public getFirst ( ) : object
리턴 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;
    }