Exemple #1
0
 /**
  * (non-PHPdoc)
  * @see library/Zend/Db/Statement/Zend_Db_Statement_Oracle::fetchAll()
  */
 public function fetchAll($style = null, $col = 0)
 {
     $result = parent::fetchAll($style, $col);
     if (isset($result[0])) {
         for ($iLine = 0; $iLine < count($result); $iLine++) {
             if (is_array($result[$iLine])) {
                 foreach ($result[$iLine] as $key => $value) {
                     unset($result[$iLine][$key]);
                     if (is_object($value)) {
                         @($lobValue = $value->load());
                         @$value->free();
                         $value = $lobValue;
                     }
                     $result[$iLine][$this->_adapter->foldCase($key)] = $value;
                 }
             } else {
                 $object = new stdClass();
                 foreach ($result[$iLine] as $key => $value) {
                     if (is_object($value)) {
                         @($lobValue = $value->load());
                         @$value->free();
                         $value = $lobValue;
                     }
                     $object->{$this->_adapter->foldCase($key)} = $value;
                 }
                 $result[$iLine] = $object;
             }
         }
     }
     return $result;
 }
Exemple #2
0
 /**
  * Returns an array containing all of the result set rows.
  *
  * @param int $style (optional) Fetch mode.
  * @param int $col   (optional) Column number, if fetch mode is by column.
  * @return array Collection of rows, each in a format by the fetch mode.
  * @throws Zend_Db_Statement_Exception
  */
 public function fetchAll($style = null, $col = 0)
 {
     $retval = parent::fetchAll($style, $col);
     if (false === $retval) {
         return false;
     }
     if (is_array($retval)) {
         return array_map(array($this, '_caseFoldingCallback'), $retval);
     }
     return $retval;
 }