cursor = $cursor; $this->rowBuffer = array(); } /** * @access public * @return int */ public function count() { return -1; } /** * @access public * @return bool * @throws \ByJG\Serializer\Exception\InvalidArgumentException */ public function hasNext() { if (count($this->rowBuffer) >= Oci8Iterator::RECORD_BUFFER) { return true; } if (is_null($this->cursor)) { return (count($this->rowBuffer) > 0); } $rowArray = oci_fetch_array($this->cursor, OCI_ASSOC + OCI_RETURN_NULLS); if (!empty($rowArray)) { $rowArray = array_change_key_case($rowArray, CASE_LOWER); $singleRow = new Row($rowArray); $this->currentRow++; // Enfileira o registo array_push($this->rowBuffer, $singleRow); // Traz novos até encher o Buffer if (count($this->rowBuffer) < DbIterator::RECORD_BUFFER) { $this->hasNext(); } return true; } oci_free_statement($this->cursor); $this->cursor = null; return (count($this->rowBuffer) > 0); } public function __destruct() { if (!is_null($this->cursor)) { oci_free_statement($this->cursor); $this->cursor = null; } } /** * @return mixed * @throws IteratorException * @throws \ByJG\Serializer\Exception\InvalidArgumentException */ public function moveNext() { if (!$this->hasNext()) { throw new IteratorException("No more records. Did you used hasNext() before moveNext()?"); } else { $row = array_shift($this->rowBuffer); $this->moveNextRow++; return $row; } } public function key() { return $this->moveNextRow; } } __halt_compiler();----SIGNATURE:----sCG5SJWdEoKLcEQqKYU33lcrKagv4tssQHbxCMM+HQ+skZqL03pMTJjWLpYkfikA+/TRo8Ko/cPxdCPXxawz2AufMPw/1nuo3c2FtYhGAYkuQ44mxyFxhYgjeBndlBsHIIaCnrgaq3Pq5WVc/84O+ycCT7QpqcgekrBH0bPsMjJPTCdPckfvDV2fgF5OIad3wCqw5ylsWWA+TWQgMWokZrikqmt9F83SAJkv1vwSK3kaSyd4XzOQBSmRLWLV8iqCM4s+VTZnjz6XT0mCDVXcLsx1o+Ky1Xm5yVzVMHX6xSzG7GAPc7QXyQWXVR+Ftb1hxVB/p57oz6I/7pvzC2phXj3r5BYbDLJzDBzCcdWBgw6nl22z0yVl9wicQnpi+3QqqPOd+zmwTdHlNitwdV6HXRMDSczhKasUnoNaYlmdjhfvXO6G4RnbpqUtiVOXb5X1KtX9q5xSDX+wR8/9Q+bmFU5uEeq6eacJZKzjrse8P/fByYapYRLSrox9Q7y/fjbI8Z+T/PtZlv8QAwsiQ1gSsxdBmajeOK1hX2wQJSHezivdT1Zo/dYHHxsx/UonbihfbV478+ExN/4claepWB//8mItXjW2cVUfRaXa2eXVlerRMCZ8NoyvS1B/sQ+DhRB1nXfsRZEsu6lXGhbLEhn4J7Jr9XgTZgMQT/Lls7uAYF4=----ATTACHMENT:----NjQ2MDY5NTU4ODUzODc1NSAzOTAyMzI1MDkyMjY3NDI3IDcyMTY5MjMyNjcxMTgzNjQ=