lib/recurly/pager.php
public function current()
  {
    // Work around pre-PHP 5.5 issue that prevents `empty($this->count())`:
    if (!isset($this->_objects)) {
      $this->_loadFrom($this->_href);
    }

    if ($this->_position >= sizeof($this->_objects)) {
      if (isset($this->_links['next'])) {
        $this->_loadFrom($this->_links['next']);
        $this->_position = 0;
      }
      else if (empty($this->_objects) && ($this->_position == 0)) {
        return null;
      }
      else {
        throw new Recurly_Error("Pager is not in a valid state");
      }
    }

    return $this->_objects[$this->_position];
  }
public function current()
  {
    // Work around pre-PHP 5.5 issue that prevents `empty($this->count())`:
    if (!isset($this->_objects)) {
      $this->_loadFrom($this->_href);
    }

    if ($this->_position >= sizeof($this->_objects)) {
      if (isset($this->_links['next'])) {
        $this->_loadFrom($this->_links['next']);
        $this->_position = 0;
      }
      else if (empty($this->_objects) && ($this->_position == 0)) {
        return null;
      }
      else {
        throw new Recurly_Error("Pager is not in a valid state");
      }
    }

    return $this->_objects[$this->_position];
  }
public function current ( ) { // Work around pre-PHP 5.5 issue that prevents `empty($this->count())`: if ( ! isset ( $ this -> _objects ) ) { $ this -> _loadFrom ( $ this -> _href ) ; } if ( $ this -> _position >= sizeof ( $ this -> _objects ) ) { if ( isset ( $ this -> _links [ 'next' ] ) ) { $ this -> _loadFrom ( $ this -> _links [ 'next' ] ) ; $ this -> _position = 0 ; } else if ( empty ( $ this -> _objects ) && ( $ this -> _position == 0 ) ) { return null ; } else { throw new Recurly_Error ( "Pager is not in a valid state" ) ; } } return $ this -> _objects [ $ this -> _position ] ; }
The current object

@return Recurly_Resource the current object
@throws Recurly_Error
The current object