1
0
mirror of synced 2025-01-30 20:11:49 +03:00

DCOM-93 - Add empty initialize and wakeup methods.

This commit is contained in:
Benjamin Eberlei 2012-01-02 15:36:36 +01:00
parent 9bdf9a9904
commit 80408ac34f

View File

@ -268,6 +268,7 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
}
$class = $this->newClassMetadataInstance($className);
$this->initializeReflection($class, $this->getReflectionService());
if ($parent) {
$class->setInheritanceType($parent->inheritanceType);
@ -289,6 +290,7 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
// Invoke driver
try {
$this->driver->loadMetadataForClass($className, $class);
$this->wakeupReflection($class, $this->getReflectionService());
} catch (ReflectionException $e) {
throw MappingException::reflectionFailure($className, $e);
}
@ -563,4 +565,26 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
{
$this->reflectionService = $reflectionService;
}
/**
* Wakeup reflection after ClassMetadata gets unserialized from cache.
*
* @param ClassMetadata $class
* @param ReflectionService $reflService
* @return void
*/
protected function wakeupReflection(ClassMetadataInfo $class, ReflectionService $reflService)
{
}
/**
* Initialize Reflection after ClassMetadata was constructed.
*
* @param ClassMetadata $class
* @param ReflectionSErvice $reflService
* @return void
*/
protected function initializeReflection(ClassMetadataInfo $class, ReflectionService $reflService)
{
}
}