| 2289 | | self::$db->loadModule('Reverse', null, true); |
| 2290 | | $this->content_columns = self::$db->reverse->tableInfo($table_name); |
| 2291 | | if($this->is_error($this->content_columns)) { |
| 2292 | | $this->raise($this->content_columns->getMessage()); |
| 2293 | | } |
| 2294 | | if(is_array($this->content_columns)) { |
| 2295 | | $i = 0; |
| 2296 | | foreach($this->content_columns as $column) { |
| 2297 | | $this->content_columns[$i++]['human_name'] = Inflector::humanize($column['name']); |
| | 2297 | if(isset(self::$table_info[$table_name])) { |
| | 2298 | $this->content_columns = self::$table_info[$table_name]; |
| | 2299 | } else { |
| | 2300 | self::$db->loadModule('Reverse', null, true); |
| | 2301 | $this->content_columns = self::$db->reverse->tableInfo($table_name); |
| | 2302 | if($this->is_error($this->content_columns)) { |
| | 2303 | $this->raise($this->content_columns->getMessage()); |
| | 2304 | } |
| | 2305 | if(is_array($this->content_columns)) { |
| | 2306 | $i = 0; |
| | 2307 | foreach($this->content_columns as $column) { |
| | 2308 | $this->content_columns[$i++]['human_name'] = Inflector::humanize($column['name']); |
| | 2309 | } |
| | 2310 | self::$table_info[$table_name] = $this->content_columns; |