Example #1
0
 /**
  * (non-PHPdoc)
  * @see library/Zend/Db/Statement/Zend_Db_Statement_Oracle::fetch()
  */
 public function fetch($style = null, $cursor = null, $offset = null)
 {
     $result = parent::fetch($style, $cursor, $offset);
     if ($result === false) {
         return false;
     }
     if (is_array($result)) {
         foreach ($result as $key => $value) {
             unset($result[$key]);
             if (is_object($value)) {
                 @($lobValue = $value->load());
                 @$value->free();
                 $value = $lobValue;
             }
             $result[$this->_adapter->foldCase($key)] = $value;
         }
     } else {
         $aux = $result;
         $result = new stdClass();
         foreach ($aux as $key => $value) {
             if (is_object($value)) {
                 @($lobValue = $value->load());
                 @$value->free();
                 $value = $lobValue;
             }
             $result->{$this->_adapter->foldCase($key)} = $value;
         }
     }
     return $result;
 }
Example #2
0
File: Oracle.php Project: cwcw/cms
 /**
  * Fetches a row from the result set.
  *
  * @param int $style  (optional) Fetch mode for this fetch operation.
  * @param int $cursor (optional) Absolute, relative, or other.
  * @param int $offset (optional) Number for absolute or relative cursors.
  * @return mixed Array, object or scalar depending on fetch mode.
  * @throws Zend_Db_Statement_Exception
  */
 public function fetch($style = null, $cursor = null, $offset = null)
 {
     $row = parent::fetch($style, $cursor, $offset);
     if (is_scalar($row)) {
         return $row;
     }
     if (is_array($row)) {
         return $this->_caseFoldArray($row);
     }
     if (is_object($row)) {
         return $this->_caseFoldObject($row);
     }
 }