コード例 #1
0
 /**
  * Overwritten Load a list of database rows (numeric column indexing)
  *
  * @access public
  * @param string The field name of a primary key
  * @return array If <var>key</var> is empty as sequential list of returned records.
  * If <var>key</var> is not empty then the returned array is indexed by the value
  * the database key.  Returns <var>null</var> if the query fails.
  */
 function loadRowList($key = null, $translate = true, $language = null)
 {
     if (!$translate) {
         return parent::loadRowList($key);
     }
     $results = array();
     if (is_null($key)) {
         $key = "";
     }
     $rows = $this->loadObjectList($key, 'stdClass', $translate, $language);
     $pfunc = $this->_profile();
     $row = array();
     if ($rows != null) {
         foreach ($rows as $row) {
             $fields = get_object_vars($row);
             $result = array();
             foreach ($fields as $val) {
                 $result[] = $val;
             }
             if ($key != "") {
                 $results[$row->{$key}] = $result;
             } else {
                 $results[] = $result;
             }
         }
     }
     $pfunc = $this->_profile($pfunc);
     return $results;
 }