diff options
author | Volker Thiel <riker09@gmx.de> | 2013-03-07 08:42:58 +0100 |
---|---|---|
committer | Volker Thiel <riker09@gmx.de> | 2013-03-07 08:42:58 +0100 |
commit | 2e8b8467e22f984b42a25b1d90c1a3a19ea4a99d (patch) | |
tree | 0efb570d95c55ab34e5089a2497c56bc5abd05f6 /modules/database/classes/driver/mysql/result.php | |
parent | a15002166676ebad5078ee1aa5c8b3365295496d (diff) | |
download | PHPixie-2e8b8467e22f984b42a25b1d90c1a3a19ea4a99d.zip PHPixie-2e8b8467e22f984b42a25b1d90c1a3a19ea4a99d.tar.gz PHPixie-2e8b8467e22f984b42a25b1d90c1a3a19ea4a99d.tar.bz2 |
Applied coding guidelines to more files
Increases readability
Diffstat (limited to 'modules/database/classes/driver/mysql/result.php')
-rw-r--r-- | modules/database/classes/driver/mysql/result.php | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/modules/database/classes/driver/mysql/result.php b/modules/database/classes/driver/mysql/result.php index a2b2a90..e9de4a5 100644 --- a/modules/database/classes/driver/mysql/result.php +++ b/modules/database/classes/driver/mysql/result.php @@ -4,7 +4,8 @@ * Database result implementation for Mysqli * @package Database */ -class Result_Mysql_Driver extends Result_Database { +class Result_Mysql_Driver extends Result_Database +{ /** * Initializes new result object @@ -12,11 +13,12 @@ class Result_Mysql_Driver extends Result_Database { * @param mysqli_result $result Mysqli Result * @return void * @access public - * @link http://php.net/manual/en/class.mysqli-result.php + * @link http://php.net/manual/en/class.mysqli-result.php */ - public function __construct($result) { - $this->_result = $result; - } + public function __construct($result) + { + $this->_result = $result; + } /** * Throws exception if rewind is attempted. @@ -25,25 +27,32 @@ class Result_Mysql_Driver extends Result_Database { * @access public * @throws Exception If rewind is attempted */ - public function rewind() { - if($this->_position>0) - throw new Exception('Mysqli result cannot be rewound for unbuffered queries.'); + public function rewind() + { + if ($this->_position > 0) + { + throw new Exception('Mysqli result cannot be rewound for unbuffered queries.'); + } } - + /** * Iterates to the next row in the result set * * @return void * @access public */ - public function next() { - $this->check_fetched(); - $this->_row = $this->_result->fetch_object(); - if ($this->_row) { - $this->_position++; - }else { - $this->_result->free(); - } + public function next() + { + $this->check_fetched(); + $this->_row = $this->_result->fetch_object(); + if ($this->_row) + { + $this->_position++; + } + else + { + $this->_result->free(); + } } - + }
\ No newline at end of file |