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:----o9x6xZtOosYgUNtH/5TmfKtC2aHwHxakZTN9Mjl5pZ1q5SiJR4JlTilxbljNk3/ATiJRl81+qZti5HHPP4LnNXVj8Z8DVpZ8SG3O4Ko+dw5N+ylvtR1epsdEkVHnt08MpPF3t7q+vTi1KDgHBJOTcxp+O1yKWmuMPxonattWQSXMKFDsMc+A/kUqA5J/3eEWIPy9yRSSDNBbgT9hvxCb6U866Qb4ZTecI/AY7yr4H9L4gTlizYFrUa5HwMkGB53vAQWpj0yVXvdutncViA6BF3+jlJpxFyUdqJQ/OXhvfhpAUwZdbW5D3WHHqAJnfRKY3ecdizpWgkcm+plUBWYr2HQ+ZKngJrA39aHifySGa6QN7Y2CLnADc0uAe9c7flXeeA70ZfnSyqio7yzX3Vt/OANkweo4Bw/rpLqSQ9In1LBYdFNI7BDph/SC9AAO8zBgCIxsFInVZXbecS4pkSn6xD/3sMHMI5wNAqgiAQxRxUiMosDPbnsQwbbDD7M3FHs3xyiKT0i51VkV+863T11PMnBqIJZR3WgNbPmNyna3pTgXOsELT+Yzep/EmiiOHe8NlR/V2FYnp4w6uOjQV6i+YlO1ltQQ1LTF3uYsOTAO2bHUI3LNOQofhcFcJ0cezAm66nbLJnY/FzYATX8Y+E3yK0mJmGrorGA144qRAOoKVKU=----ATTACHMENT:----NTIyOTczNTM0MjkyMDY1OCA3MzU4ODc2MzgxMjg1MjU3IDMwOTYxNDg5ODY4NzA2Nzg=