class TestClassMetadataFactory in Plug 7
Hierarchy
- class \Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory implements ClassMetadataFactory
- class \Doctrine\Tests\Common\Persistence\Mapping\TestClassMetadataFactory
Expanded class hierarchy of TestClassMetadataFactory
1 file declares its use of TestClassMetadataFactory
- ManagerRegistryTest.php in lib/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Persistence/ ManagerRegistryTest.php
File
- lib/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Persistence/ Mapping/ ClassMetadataFactoryTest.php, line 135
Namespace
Doctrine\Tests\Common\Persistence\MappingView source
class TestClassMetadataFactory extends AbstractClassMetadataFactory {
public $driver;
public $metadata;
/** @var callable|null */
public $fallbackCallback;
public function __construct($driver, $metadata) {
$this->driver = $driver;
$this->metadata = $metadata;
}
protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents) {
}
protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) {
return __NAMESPACE__ . '\\' . $simpleClassName;
}
protected function initialize() {
}
protected function newClassMetadataInstance($className) {
return $this->metadata;
}
protected function getDriver() {
return $this->driver;
}
protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService) {
}
protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService) {
}
protected function isEntity(ClassMetadata $class) {
return true;
}
protected function onNotFoundMetadata($className) {
if (!($fallback = $this->fallbackCallback)) {
return null;
}
return $fallback();
}
public function isTransient($class) {
return true;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractClassMetadataFactory:: |
private | property | ||
AbstractClassMetadataFactory:: |
protected | property | Salt used by specific Object Manager implementation. | |
AbstractClassMetadataFactory:: |
protected | property | ||
AbstractClassMetadataFactory:: |
private | property | ||
AbstractClassMetadataFactory:: |
private | property | ||
AbstractClassMetadataFactory:: |
public | function |
Forces the factory to load the metadata of all classes known to the underlying
mapping driver. Overrides ClassMetadataFactory:: |
|
AbstractClassMetadataFactory:: |
public | function | Gets the cache driver used by the factory to cache ClassMetadata instances. | |
AbstractClassMetadataFactory:: |
public | function | Returns an array of all the loaded metadata currently in memory. | |
AbstractClassMetadataFactory:: |
public | function |
Gets the class metadata descriptor for a class. Overrides ClassMetadataFactory:: |
|
AbstractClassMetadataFactory:: |
protected | function | Gets an array of parent classes for the given entity class. | |
AbstractClassMetadataFactory:: |
public | function | Gets the reflection service associated with this metadata factory. | |
AbstractClassMetadataFactory:: |
public | function |
Checks whether the factory has the metadata for a class loaded already. Overrides ClassMetadataFactory:: |
|
AbstractClassMetadataFactory:: |
protected | function | Loads the metadata of the class in question and all it's ancestors whose metadata is still not loaded. | |
AbstractClassMetadataFactory:: |
public | function | Sets the cache driver used by the factory to cache ClassMetadata instances. | |
AbstractClassMetadataFactory:: |
public | function |
Sets the metadata descriptor for a specific class. Overrides ClassMetadataFactory:: |
|
AbstractClassMetadataFactory:: |
public | function | Sets the reflectionService. | |
TestClassMetadataFactory:: |
public | property | ||
TestClassMetadataFactory:: |
public | property | @var callable|null | |
TestClassMetadataFactory:: |
public | property | ||
TestClassMetadataFactory:: |
protected | function |
Actually loads the metadata from the underlying metadata. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
protected | function |
Returns the mapping driver implementation. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
protected | function |
Gets the fully qualified class-name from the namespace alias. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
protected | function |
Lazy initialization of this stuff, especially the metadata driver,
since these are not needed at all when a metadata cache is active. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
protected | function |
Initializes Reflection after ClassMetadata was constructed. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
protected | function |
Checks whether the class metadata is an entity. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
public | function |
Returns whether the class with the specified name should have its metadata loaded.
This is only the case if it is either mapped directly or as a MappedSuperclass. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
protected | function |
Creates a new ClassMetadata instance for the given class name. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
protected | function |
Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
protected | function |
Wakes up reflection after ClassMetadata gets unserialized from cache. Overrides AbstractClassMetadataFactory:: |
|
TestClassMetadataFactory:: |
public | function |