abstract class AbstractDoctrineExtension extends Extension
This abstract classes groups common code that Doctrine Object Manager extensions (ORM, MongoDB, CouchDB) need.
protected | $aliasMap | Used inside metadata driver method to simplify aggregation of data. | |
protected | $drivers | Used inside metadata driver method to simplify aggregation of data. |
string | getXsdValidationBasePath() Returns the base path for the XSD files. | from Extension |
string | getNamespace() Returns the namespace to be used for this extension (XML namespace). | from Extension |
string | getAlias() Returns the recommended alias to use in XML. | from Extension |
ConfigurationInterface|null | getConfiguration(array $config, ContainerBuilder $container) Returns extension configuration. | from Extension |
processConfiguration(ConfigurationInterface $configuration, array $configs) | from Extension | |
getProcessedConfigs() | from Extension | |
bool | isConfigEnabled(ContainerBuilder $container, array $config) | from Extension |
array | getAnnotatedClassesToCompile() Gets the annotated classes to cache. | from Extension |
addAnnotatedClassesToCompile(array $annotatedClasses) Adds annotated classes to the class cache. | from Extension | |
loadMappingInformation(array $objectManager, ContainerBuilder $container) | ||
setMappingDriverAlias(array $mappingConfig, string $mappingName) Register the alias for this mapping driver. | ||
setMappingDriverConfig(array $mappingConfig, string $mappingName) Register the mapping driver configuration for later use with the object managers metadata driver chain. | ||
array|false | getMappingDriverBundleConfigDefaults(array $bundleConfig, ReflectionClass $bundle, ContainerBuilder $container) If this is a bundle controlled mapping all the missing information can be autodetected by this method. | |
registerMappingDrivers(array $objectManager, ContainerBuilder $container) Register all the collected mapping information with the object manager by registering the appropriate mapping drivers. | ||
assertValidMappingConfiguration(array $mappingConfig, string $objectManagerName) Assertion if the specified mapping information is valid. | ||
string|null | detectMetadataDriver(string $dir, ContainerBuilder $container) Detects what metadata driver to use for the supplied directory. | |
loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, string $cacheName) Loads a configured object manager metadata, query or result cache driver. | ||
string | loadCacheDriver(string $cacheName, string $objectManagerName, array $cacheDriver, ContainerBuilder $container) Loads a cache driver. | |
array | fixManagersAutoMappings(array $managerConfigs, array $bundles) Returns a modified version of $managerConfigs. | |
string | getObjectManagerElementName(string $name) Prefixes the relative dependency injection container path with the object manager prefix. | |
string | getMappingObjectDefaultName() Noun that describes the mapped objects such as Entity or Document. | |
string | getMappingResourceConfigDirectory() Relative path from the bundle root to the directory where mapping files reside. | |
string | getMappingResourceExtension() Extension used by the mapping files. |
Returns the base path for the XSD files.
string | The XSD base path |
Returns the namespace to be used for this extension (XML namespace).
string | The XML namespace |
Returns the recommended alias to use in XML.
This alias is also the mandatory prefix to use when using YAML.
This convention is to remove the "Extension" postfix from the class name and then lowercase and underscore the result. So:
AcmeHelloExtension
becomes
acme_hello
This can be overridden in a sub-class to specify the alias manually.
string | The alias |
BadMethodCallException | When the extension name does not follow conventions |
Returns extension configuration.
array | $config | |
ContainerBuilder | $container |
ConfigurationInterface|null | The configuration or null |
ConfigurationInterface | $configuration | |
array | $configs |
ContainerBuilder | $container | |
array | $config |
bool | Whether the configuration is enabled |
InvalidArgumentException | When the config is not enableable |
Gets the annotated classes to cache.
array | An array of classes |
Adds annotated classes to the class cache.
array | $annotatedClasses | An array of class patterns |
array | $objectManager | A configured object manager |
ContainerBuilder | $container | A ContainerBuilder instance |
InvalidArgumentException |
Register the alias for this mapping driver.
Aliases can be used in the Query languages of all the Doctrine object managers to simplify writing tasks.
array | $mappingConfig | |
string | $mappingName |
Register the mapping driver configuration for later use with the object managers metadata driver chain.
array | $mappingConfig | |
string | $mappingName |
InvalidArgumentException |
If this is a bundle controlled mapping all the missing information can be autodetected by this method.
Returns false when autodetection failed, an array of the completed information otherwise.
array | $bundleConfig | |
ReflectionClass | $bundle | |
ContainerBuilder | $container |
array|false |
Register all the collected mapping information with the object manager by registering the appropriate mapping drivers.
array | $objectManager | |
ContainerBuilder | $container | A ContainerBuilder instance |
Assertion if the specified mapping information is valid.
array | $mappingConfig | |
string | $objectManagerName |
InvalidArgumentException |
Detects what metadata driver to use for the supplied directory.
string | $dir | A directory path |
ContainerBuilder | $container | A ContainerBuilder instance |
string|null | A metadata driver short name, if one can be detected |
Loads a configured object manager metadata, query or result cache driver.
array | $objectManager | A configured object manager |
ContainerBuilder | $container | A ContainerBuilder instance |
string | $cacheName |
InvalidArgumentException | in case of unknown driver type |
Loads a cache driver.
string | $cacheName | The cache driver name |
string | $objectManagerName | The object manager name |
array | $cacheDriver | The cache driver mapping |
ContainerBuilder | $container | The ContainerBuilder instance |
string |
InvalidArgumentException |
Returns a modified version of $managerConfigs.
The manager called $autoMappedManager will map all bundles that are not mapped by other managers.
array | $managerConfigs | |
array | $bundles |
array | The modified version of $managerConfigs |
Prefixes the relative dependency injection container path with the object manager prefix.
string | $name |
string |
Noun that describes the mapped objects such as Entity or Document.
Will be used for autodetection of persistent objects directory.
string |
Relative path from the bundle root to the directory where mapping files reside.
string |
Extension used by the mapping files.
string |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.html