module/FzyCommon/src/FzyCommon/Service/Search/Base.php
public function getResult($offset = 0)
    {
        if (!is_array($this->results)) {
            throw new NoResultsToGet('No results have been generated');
        }
        if (!isset($this->results[$offset])) {
            throw new InvalidResultOffset("Unable to get result at offset '$offset'");
        }

        return $this->results[$offset];
    }
public function getResult($offset = 0)
    {
        if (!is_array($this->results)) {
            throw new NoResultsToGet('No results have been generated');
        }
        if (!isset($this->results[$offset])) {
            throw new InvalidResultOffset("Unable to get result at offset '$offset'");
        }

        return $this->results[$offset];
    }
Convenience method for retrieving a single result (defaults to return the first)
@param  int                                             $offset
@return mixed
@throws \FzyCommon\Exception\Search\NoResultsToGet
@throws \FzyCommon\Exception\Search\InvalidResultOffset