Elastica\ResultSet::current PHP Method

current() public method

Returns the current object of the set.
public current ( ) : Result | boolean
return Result | boolean Set object or false if not valid (no more entries)
    public function current()
    {
        if ($this->valid()) {
            return $this->_results[$this->key()];
        } else {
            return false;
        }
    }

Usage Example

 public function current()
 {
     return new SugarSeachEngineElasticResult($this->elasticaResultSet->current());
 }