protected static function resolveCacheAndMapMetadataForAllClassesInHeirarchy() { try { // not using default value to save cpu cycles on requests that follow the first exception. $cachedData = BeanModelCache::getEntry(self::CACHE_IDENTIFIER . get_called_class()); static::resolveCachedMetadataForIntegrity($cachedData); self::$attributeNamesToClassNames[get_called_class()] = $cachedData['attributeNamesToClassNames'][get_called_class()]; self::$attributeNamesNotBelongsToOrManyMany[get_called_class()] = $cachedData['attributeNamesNotBelongsToOrManyMany'][get_called_class()]; self::$relationNameToRelationTypeModelClassNameAndOwns[get_called_class()] = $cachedData['relationNameToRelationTypeModelClassNameAndOwns'][get_called_class()]; self::$derivedRelationNameToTypeModelClassNameAndOppposingRelation[get_called_class()] = $cachedData['derivedRelationNameToTypeModelClassNameAndOppposingRelation'][get_called_class()]; } catch (NotFoundException $e) { self::mapMetadataForAllClassesInHeirarchy(); $cachedData = array(); $cachedData['attributeNamesToClassNames'][get_called_class()] = self::$attributeNamesToClassNames[get_called_class()]; $cachedData['attributeNamesNotBelongsToOrManyMany'][get_called_class()] = self::$attributeNamesNotBelongsToOrManyMany[get_called_class()]; $cachedData['relationNameToRelationTypeModelClassNameAndOwns'][get_called_class()] = self::$relationNameToRelationTypeModelClassNameAndOwns[get_called_class()]; $cachedData['derivedRelationNameToTypeModelClassNameAndOppposingRelation'][get_called_class()] = self::$derivedRelationNameToTypeModelClassNameAndOppposingRelation[get_called_class()]; BeanModelCache::cacheEntry(self::CACHE_IDENTIFIER . get_called_class(), $cachedData); } }
protected static function resolveCacheAndMapMetadataForAllClassesInHeirarchy() { try { $cachedData = BeanModelCache::getEntry(self::CACHE_IDENTIFIER . get_called_class()); self::$attributeNamesToClassNames[get_called_class()] = $cachedData['attributeNamesToClassNames'][get_called_class()]; self::$attributeNamesNotBelongsToOrManyMany[get_called_class()] = $cachedData['attributeNamesNotBelongsToOrManyMany'][get_called_class()]; self::$relationNameToRelationTypeModelClassNameAndOwns[get_called_class()] = $cachedData['relationNameToRelationTypeModelClassNameAndOwns'][get_called_class()]; self::$derivedRelationNameToTypeModelClassNameAndOppposingRelation[get_called_class()] = $cachedData['derivedRelationNameToTypeModelClassNameAndOppposingRelation'][get_called_class()]; } catch (NotFoundException $e) { self::mapMetadataForAllClassesInHeirarchy(); $cachedData = array(); $cachedData['attributeNamesToClassNames'][get_called_class()] = self::$attributeNamesToClassNames[get_called_class()]; $cachedData['attributeNamesNotBelongsToOrManyMany'][get_called_class()] = self::$attributeNamesNotBelongsToOrManyMany[get_called_class()]; $cachedData['relationNameToRelationTypeModelClassNameAndOwns'][get_called_class()] = self::$relationNameToRelationTypeModelClassNameAndOwns[get_called_class()]; $cachedData['derivedRelationNameToTypeModelClassNameAndOppposingRelation'][get_called_class()] = self::$derivedRelationNameToTypeModelClassNameAndOppposingRelation[get_called_class()]; BeanModelCache::cacheEntry(self::CACHE_IDENTIFIER . get_called_class(), $cachedData); } }