class DoctrineOrmMappingsPass extends RegisterMappingsPass (View source)

Class for Symfony bundles to configure mappings for model classes not in the auto-mapped folder.

NOTE: alias is only supported by Symfony 2.6+ and will be ignored with older versions.

Methods

__construct(Definition|Reference $driver, array $namespaces, array $managerParameters, string|false $enabledParameter = false, array $aliasMap = [])

You should not directly instantiate this class but use one of the factory methods.

createXmlMappingDriver(array $namespaces, array $managerParameters = [], string|false $enabledParameter = false, array $aliasMap = [])

No description

createYamlMappingDriver(array $namespaces, array $managerParameters = [], string|false $enabledParameter = false, array $aliasMap = [])

No description

createPhpMappingDriver(array $namespaces, array $managerParameters = [], string $enabledParameter = false, array $aliasMap = [])

No description

createAnnotationMappingDriver(array $namespaces, array $directories, array $managerParameters = [], string|false $enabledParameter = false, array $aliasMap = [])

No description

createStaticPhpMappingDriver(array $namespaces, array $directories, array $managerParameters = [], string|false $enabledParameter = false, array $aliasMap = [])

No description

Details

__construct(Definition|Reference $driver, array $namespaces, array $managerParameters, string|false $enabledParameter = false, array $aliasMap = [])

You should not directly instantiate this class but use one of the factory methods.

Parameters

Definition|Reference $driver Driver DI definition or reference.
array $namespaces List of namespaces handled by $driver.
array $managerParameters Ordered list of container parameters that could hold the manager name. doctrine.default_entity_manager is appended automatically.
string|false $enabledParameter If specified, the compiler pass only executes if this parameter is defined in the service container.
array $aliasMap Map of alias to namespace.

static DoctrineOrmMappingsPass createXmlMappingDriver(array $namespaces, array $managerParameters = [], string|false $enabledParameter = false, array $aliasMap = [])

Parameters

array $namespaces Hashmap of directory path to namespace.
array $managerParameters List of parameters that could which object manager name your bundle uses. This compiler pass will automatically append the parameter name for the default entity manager to this list.
string|false $enabledParameter Service container parameter that must be present to enable the mapping. Set to false to not do any check, optional.
array $aliasMap Map of alias to namespace.

Return Value

DoctrineOrmMappingsPass

static DoctrineOrmMappingsPass createYamlMappingDriver(array $namespaces, array $managerParameters = [], string|false $enabledParameter = false, array $aliasMap = [])

Parameters

array $namespaces Hashmap of directory path to namespace
array $managerParameters List of parameters that could which object manager name your bundle uses. This compiler pass will automatically append the parameter name for the default entity manager to this list.
string|false $enabledParameter Service container parameter that must be present to enable the mapping. Set to false to not do any check, optional.
array $aliasMap Map of alias to namespace.

Return Value

DoctrineOrmMappingsPass

static DoctrineOrmMappingsPass createPhpMappingDriver(array $namespaces, array $managerParameters = [], string $enabledParameter = false, array $aliasMap = [])

Parameters

array $namespaces Hashmap of directory path to namespace
array $managerParameters List of parameters that could which object manager name your bundle uses. This compiler pass will automatically append the parameter name for the default entity manager to this list.
string $enabledParameter Service container parameter that must be present to enable the mapping. Set to false to not do any check, optional.
array $aliasMap Map of alias to namespace.

Return Value

DoctrineOrmMappingsPass

static DoctrineOrmMappingsPass createAnnotationMappingDriver(array $namespaces, array $directories, array $managerParameters = [], string|false $enabledParameter = false, array $aliasMap = [])

Parameters

array $namespaces List of namespaces that are handled with annotation mapping
array $directories List of directories to look for annotated classes
array $managerParameters List of parameters that could which object manager name your bundle uses. This compiler pass will automatically append the parameter name for the default entity manager to this list.
string|false $enabledParameter Service container parameter that must be present to enable the mapping. Set to false to not do any check, optional.
array $aliasMap Map of alias to namespace.

Return Value

DoctrineOrmMappingsPass

static DoctrineOrmMappingsPass createStaticPhpMappingDriver(array $namespaces, array $directories, array $managerParameters = [], string|false $enabledParameter = false, array $aliasMap = [])

Parameters

array $namespaces List of namespaces that are handled with static php mapping
array $directories List of directories to look for static php mapping files
array $managerParameters List of parameters that could which object manager name your bundle uses. This compiler pass will automatically append the parameter name for the default entity manager to this list.
string|false $enabledParameter Service container parameter that must be present to enable the mapping. Set to false to not do any check, optional.
array $aliasMap Map of alias to namespace.

Return Value

DoctrineOrmMappingsPass