src/Phpforce/SoapClient/Result/RecordIterator.php
protected function getObjectAt($pointer)
    {
        if ($this->queryResult->getRecord($pointer)) {
            $this->current = $this->queryResult->getRecord($pointer);

            foreach ($this->current as $key => &$value) {
                if ($value instanceof QueryResult) {
                    $value = new RecordIterator($this->client, $value);
                }
            }

            return $this->current;
        }

        // If no record was found at pointer, see if there are more records
        // available for querying
        if (!$this->queryResult->isDone()) {
            $this->queryMore();

            return $this->getObjectAt($this->pointer);
        }
    }
protected function getObjectAt($pointer)
    {
        if ($this->queryResult->getRecord($pointer)) {
            $this->current = $this->queryResult->getRecord($pointer);

            foreach ($this->current as $key => &$value) {
                if ($value instanceof QueryResult) {
                    $value = new RecordIterator($this->client, $value);
                }
            }

            return $this->current;
        }

        // If no record was found at pointer, see if there are more records
        // available for querying
        if (!$this->queryResult->isDone()) {
            $this->queryMore();

            return $this->getObjectAt($this->pointer);
        }
    }
protected function getObjectAt ( $ pointer ) { if ( $ this -> queryResult -> getRecord ( $ pointer ) ) { $ this -> current = $ this -> queryResult -> getRecord ( $ pointer ) ; foreach ( $ this -> current as $ key => & $ value ) { if ( $ value instanceof QueryResult ) { $ value = new RecordIterator ( $ this -> client , $ value ) ; } } return $ this -> current ; } // If no record was found at pointer, see if there are more records // available for querying if ( ! $ this -> queryResult -> isDone ( ) ) { $ this -> queryMore ( ) ; return $ this -> getObjectAt ( $ this -> pointer ) ; } }
Get record at pointer, or, if there is no record, try to query Salesforce
for more records

@param int $pointer

@return object
Get record at pointer or if there is no record try to query Salesforce for more records