CI_DB_result::custom_row_object PHP Method

custom_row_object() public method

Returns a single result row - custom object version
public custom_row_object ( integer $n, string $type ) : object
$n integer
$type string
return object
    public function custom_row_object($n, $type)
    {
        isset($this->custom_result_object[$type]) or $this->custom_result_object($type);
        if (count($this->custom_result_object[$type]) === 0) {
            return NULL;
        }
        if ($n !== $this->current_row && isset($this->custom_result_object[$type][$n])) {
            $this->current_row = $n;
        }
        return $this->custom_result_object[$type][$this->current_row];
    }