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:----aZvyzJbjndmXlCJUEIKVg+mP2q7XEu8ZGwOaXsHlLm3UofT86Oxg8vHHlJNhLzlz9hOx3M/Y9gQsfc1B/PRbk88AbZoVZgANbWCliCQmCPH96nYtRUXSZ4duTR4W5QEbygNs0bWUzMk81BT6xhJbVEn72uyTQnTvi2qgZDb7GIYVrDbsUF7fuhJ2k4FdI95jxBEiPvs2+5Fki3vVpmpLZIpdpu3d2VZ7JYYxPdHb9r89XEhHRWwaevHQhit1pchBA9TgAtUPfPdRse1l6eZgy+6thsX8GKk+brtc0Yl2hZMF6MytgkTkT/zeIKTq/Mi0Ak2+qJdrRTre77Fu8AKZMbzNVF5RlMnWzGoFidJpfITRxZ1N6LGZjdZ/oY76C8RxEoDwU1v+mPZHD65Ahin+upGpava744XHvnld5YGTjVzgF7rG7xExh6QVjGqOa9TanFkYb01ty5skg4wKA9qksHmla699qdbyn/8KQ+wVd02awdBF3b5xEuWJKMcrSGiHbrEeWTT3iQ9Jg8sbI4yJYBtdfXapZaQccUfAMu3S6sT59vjKWSR4BiP2nYKuzecijvJaTULocMwGsJvVtz6ttscqI/VrUud+oE00uJgN9ZsZCaQKhGRP7KNZVAKlB/L5MlJ3jZJurdfCglzUi2q92O3Jf1aCqyzy6pxjOJoQtsA=----ATTACHMENT:----NDg1Mjk0MjkwMzMxNjI0IDk0MzY3NDgyMDUwNzgyNzEgNjk0Njg1MzE1NzQyMTA2MA==