Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
iterator.php000066600000012111150775057000007114 0ustar00_tableObject = FOFTable::getInstance($parts[2], ucfirst($parts[0]) . ucfirst($parts[1])); $this->cursor = $cursor; $this->class = 'stdClass'; $this->_column = $column; $this->_fetched = 0; $this->next(); } /** * Database iterator destructor. */ public function __destruct() { if ($this->cursor) { $this->freeResult($this->cursor); } } /** * The current element in the iterator. * * @return object * * @see Iterator::current() */ public function current() { return $this->_currentTable; } /** * The key of the current element in the iterator. * * @return scalar * * @see Iterator::key() */ public function key() { return $this->_key; } /** * Moves forward to the next result from the SQL query. * * @return void * * @see Iterator::next() */ public function next() { // Set the default key as being the number of fetched object $this->_key = $this->_fetched; // Try to get an object $this->_current = $this->fetchObject(); // If an object has been found if ($this->_current) { $this->_currentTable = $this->getTable(); // Set the key as being the indexed column (if it exists) if (isset($this->_current->{$this->_column})) { $this->_key = $this->_current->{$this->_column}; } // Update the number of fetched object $this->_fetched++; } } /** * Rewinds the iterator. * * This iterator cannot be rewound. * * @return void * * @see Iterator::rewind() */ public function rewind() { } /** * Checks if the current position of the iterator is valid. * * @return boolean * * @see Iterator::valid() */ public function valid() { return (boolean) $this->_current; } /** * Method to fetch a row from the result set cursor as an object. * * @return mixed Either the next row from the result set or false if there are no more rows. */ abstract protected function fetchObject(); /** * Method to free up the memory used for the result set. * * @return void */ abstract protected function freeResult(); /** * Returns the data in $this->_current as a FOFTable instance * * @return FOFTable * * @throws OutOfBoundsException */ protected function getTable() { if (!$this->valid()) { throw new OutOfBoundsException('Cannot get item past iterator\'s bounds', 500); } $this->_tableObject->bind($this->_current); return $this->_tableObject; } } iterator/sqlsrv.php000066600000002376150775057000010462 0ustar00cursor); } /** * Method to fetch a row from the result set cursor as an object. * * @return mixed Either the next row from the result set or false if there are no more rows. */ protected function fetchObject() { return @sqlsrv_fetch_object($this->cursor, $this->class); } /** * Method to free up the memory used for the result set. * * @return void */ protected function freeResult() { @sqlsrv_free_stmt($this->cursor); } } iterator/mysql.php000066600000002367150775057000010275 0ustar00cursor); } /** * Method to fetch a row from the result set cursor as an object. * * @return mixed Either the next row from the result set or false if there are no more rows. */ protected function fetchObject() { return @mysql_fetch_object($this->cursor, $this->class); } /** * Method to free up the memory used for the result set. * * @return void */ protected function freeResult() { @mysql_free_result($this->cursor); } } iterator/index.html000066600000000037150775057000010404 0ustar00 iterator/pdo.php000066600000003015150775057000007701 0ustar00cursor) && $this->cursor instanceof PDOStatement) { return @$this->cursor->rowCount(); } else { return 0; } } /** * Method to fetch a row from the result set cursor as an object. * * @return mixed Either the next row from the result set or false if there are no more rows. */ protected function fetchObject() { if (!empty($this->cursor) && $this->cursor instanceof PDOStatement) { return @$this->cursor->fetchObject($this->class); } else { return false; } } /** * Method to free up the memory used for the result set. * * @return void */ protected function freeResult() { if (!empty($this->cursor) && $this->cursor instanceof PDOStatement) { @$this->cursor->closeCursor(); } } } iterator/azure.php000066600000001067150775057000010252 0ustar00cursor); } /** * Method to fetch a row from the result set cursor as an object. * * @return mixed Either the next row from the result set or false if there are no more rows. */ protected function fetchObject() { return @pg_fetch_object($this->cursor, null, $this->class); } /** * Method to free up the memory used for the result set. * * @return void */ protected function freeResult() { @pg_free_result($this->cursor); } } iterator/mysqli.php000066600000002374150775057000010444 0ustar00cursor); } /** * Method to fetch a row from the result set cursor as an object. * * @return mixed Either the next row from the result set or false if there are no more rows. */ protected function fetchObject() { return @mysqli_fetch_object($this->cursor, $this->class); } /** * Method to free up the memory used for the result set. * * @return void */ protected function freeResult() { @mysqli_free_result($this->cursor); } }