class MappingDriverChain implements MappingDriver (View source)

The DriverChain allows you to add multiple other mapping drivers for certain namespaces

Methods

getDefaultDriver()

Get the default driver.

setDefaultDriver(MappingDriver $driver)

Set the default driver.

addDriver(MappingDriver $nestedDriver, string $namespace)

Add a nested driver.

array
getDrivers()

Get the array of nested drivers.

loadMetadataForClass(string $className, ClassMetadata $metadata)

Loads the metadata for the specified class into the provided container.

array
getAllClassNames()

Gets the names of all mapped classes known to this driver.

boolean
isTransient(string $className)

Whether the class with the specified name should have its metadata loaded.

Details

MappingDriver|null getDefaultDriver()

Get the default driver.

Return Value

MappingDriver|null

setDefaultDriver(MappingDriver $driver)

Set the default driver.

Parameters

MappingDriver $driver

addDriver(MappingDriver $nestedDriver, string $namespace)

Add a nested driver.

Parameters

MappingDriver $nestedDriver
string $namespace

array getDrivers()

Get the array of nested drivers.

Return Value

array $drivers

loadMetadataForClass(string $className, ClassMetadata $metadata)

Loads the metadata for the specified class into the provided container.

Parameters

string $className
ClassMetadata $metadata

Exceptions

MappingException

array getAllClassNames()

Gets the names of all mapped classes known to this driver.

Return Value

array The names of all mapped classes known to this driver.

boolean isTransient(string $className)

Whether the class with the specified name should have its metadata loaded.

This is only the case for non-transient classes either mapped as an Entity or MappedSuperclass.

Parameters

string $className

Return Value

boolean