01.11
php
saved
robby
Note
The beginnings of my search for an elegant column prefix solution.
The beginnings of my search for an elegant column prefix solution.
- // Strip out column names
- function afterFind ($results, $primary = false){
- // Ignore non-array data. These aren't the droids we're looking for
- return $results;
- }
- // Figure out what prefixes need to be stripped from which models
- if ( $thisModel == $this->name ) {
- $stripPrefixes[$thisModel] = $this->columnPrefix;
- }
- $stripPrefixes[$thisModel] = $this->{$thisModel}->columnPrefix;
- }
- }
- }
- // Now, loop through the results returned and strip out column names
- continue;
- }
- $results[$recordKey][$thisModel][substr($thisField, $stripLen)] = $results[$recordKey][$thisModel][$thisField];
- }
- }
- }
- return $results;
- }
Parsed in 0.057 seconds, using GeSHi 1.0.7.14