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;
    }
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;
    }
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 ; }
Returns the first object in the result set

@return object
@api
Returns the first object in the result set