final public function prepare_to_cache() {
        $result = array();
        foreach ($this as $key => $value) {
            if ($value instanceof cacheable_object) {
                $value = new cache_cached_object($value);
            } else {
                throw new coding_exception('Only cacheable_object instances can be added to a cacheable_array');
            }
            $result[$key] = $value;
        }
        return $result;
    }
final public function prepare_to_cache() {
        $result = array();
        foreach ($this as $key => $value) {
            if ($value instanceof cacheable_object) {
                $value = new cache_cached_object($value);
            } else {
                throw new coding_exception('Only cacheable_object instances can be added to a cacheable_array');
            }
            $result[$key] = $value;
        }
        return $result;
    }
final public function prepare_to_cache ( ) { $ result = array ( ) ; foreach ( $ this as $ key => $ value ) { if ( $ value instanceof cacheable_object ) { $ value = new cache_cached_object ( $ value ) ; } else { throw new coding_exception ( 'Only cacheable_object instances can be added to a cacheable_array' ) ; } $ result [ $ key ] = $ value ; } return $ result ; }
Returns the data to cache for this object.

@return array An array of cache_cached_object instances.
@throws coding_exception
Returns the data to cache for this object .