예제 #1
0
 /**
  * Get record at pointer, or, if there is no record, try to query Salesforce
  * for more records
  *
  * @param int $pointer
  *
  * @return SObject
  */
 protected function getObjectAt($pointer)
 {
     if ($current = $this->queryResult->getRecord($pointer)) {
         $this->current = $current;
         if (null !== $this->sfToPhpConverter) {
             $this->current = call_user_func($this->sfToPhpConverter, $this->current);
         }
         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);
     }
     return null;
 }
예제 #2
0
 /**
  * Get record at pointer, or, if there is no record, try to query Salesforce
  * for more records
  *
  * @param int $pointer
  *
  * @return object
  */
 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);
     }
 }