/** * Applies a callback to a copy of all data in the collection * and returns the result. * * Overriden to load any data that has not yet been loaded. * * @param callback $filter The filter to apply. * @param array $options The available options are: * - `'collect'`: If `true`, the results will be returned wrapped * in a new `Collection` object or subclass. * @return object The filtered data. */ public function map($filter, array $options = array()) { $this->offsetGet(null); return parent::map($filter, $options); }