Skip to content

Commit

Permalink
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into …
Browse files Browse the repository at this point in the history
…develop
  • Loading branch information
timw4mail committed Oct 25, 2011
2 parents 8e66cd7 + 3932ca1 commit a662da3
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 151 deletions.
4 changes: 2 additions & 2 deletions application/errors/error_php.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
Line: <?php echo $error['line'] ?><br />
Function: <?php echo $error['function'] ?>
</p>
<? endif ?>
<?php endif ?>

<? endforeach ?></p>
<?php endforeach ?></p>

<?php endif ?>

Expand Down
46 changes: 23 additions & 23 deletions system/database/DB_result.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CI_DB_result {
* @param string can be "object" or "array"
* @return mixed either a result object or array
*/
function result($type = 'object')
public function result($type = 'object')
{
if ($type == 'array') return $this->result_array();
else if ($type == 'object') return $this->result_object();
Expand All @@ -72,7 +72,7 @@ function result($type = 'object')
* @param class_name A string that represents the type of object you want back
* @return array of objects
*/
function custom_result_object($class_name)
public function custom_result_object($class_name)
{
if (array_key_exists($class_name, $this->custom_result_object))
{
Expand All @@ -91,12 +91,12 @@ function custom_result_object($class_name)
while ($row = $this->_fetch_object())
{
$object = new $class_name();

foreach ($row as $key => $value)
{
$object->$key = $value;
}

$result_object[] = $object;
}

Expand All @@ -112,7 +112,7 @@ function custom_result_object($class_name)
* @access public
* @return object
*/
function result_object()
public function result_object()
{
if (count($this->result_object) > 0)
{
Expand Down Expand Up @@ -144,7 +144,7 @@ function result_object()
* @access public
* @return array
*/
function result_array()
public function result_array()
{
if (count($this->result_array) > 0)
{
Expand Down Expand Up @@ -178,7 +178,7 @@ function result_array()
* @param string can be "object" or "array"
* @return mixed either a result object or array
*/
function row($n = 0, $type = 'object')
public function row($n = 0, $type = 'object')
{
if ( ! is_numeric($n))
{
Expand Down Expand Up @@ -210,7 +210,7 @@ function row($n = 0, $type = 'object')
* @access public
* @return object
*/
function set_row($key, $value = NULL)
public function set_row($key, $value = NULL)
{
// We cache the row data for subsequent uses
if ( ! is_array($this->row_data))
Expand Down Expand Up @@ -242,7 +242,7 @@ function set_row($key, $value = NULL)
* @access public
* @return object
*/
function custom_row_object($n, $type)
public function custom_row_object($n, $type)
{
$result = $this->custom_result_object($type);

Expand All @@ -265,7 +265,7 @@ function custom_row_object($n, $type)
* @access public
* @return object
*/
function row_object($n = 0)
public function row_object($n = 0)
{
$result = $this->result_object();

Expand All @@ -290,7 +290,7 @@ function row_object($n = 0)
* @access public
* @return array
*/
function row_array($n = 0)
public function row_array($n = 0)
{
$result = $this->result_array();

Expand All @@ -316,7 +316,7 @@ function row_array($n = 0)
* @access public
* @return object
*/
function first_row($type = 'object')
public function first_row($type = 'object')
{
$result = $this->result($type);

Expand All @@ -335,7 +335,7 @@ function first_row($type = 'object')
* @access public
* @return object
*/
function last_row($type = 'object')
public function last_row($type = 'object')
{
$result = $this->result($type);

Expand All @@ -354,7 +354,7 @@ function last_row($type = 'object')
* @access public
* @return object
*/
function next_row($type = 'object')
public function next_row($type = 'object')
{
$result = $this->result($type);

Expand All @@ -379,7 +379,7 @@ function next_row($type = 'object')
* @access public
* @return object
*/
function previous_row($type = 'object')
public function previous_row($type = 'object')
{
$result = $this->result($type);

Expand All @@ -406,14 +406,14 @@ function previous_row($type = 'object')
* operational due to the unavailability of the database resource IDs with
* cached results.
*/
function num_rows() { return $this->num_rows; }
function num_fields() { return 0; }
function list_fields() { return array(); }
function field_data() { return array(); }
function free_result() { return TRUE; }
function _data_seek() { return TRUE; }
function _fetch_assoc() { return array(); }
function _fetch_object() { return array(); }
public function num_rows() { return $this->num_rows; }
public function num_fields() { return 0; }
public function list_fields() { return array(); }
public function field_data() { return array(); }
public function free_result() { return TRUE; }
protected function _data_seek() { return TRUE; }
protected function _fetch_assoc() { return array(); }
protected function _fetch_object() { return array(); }

}
// END DB_result class
Expand Down
Loading

0 comments on commit a662da3

Please sign in to comment.