DriverChain
extends MappingDriverChain
in package
The DriverChain allows you to add multiple other mapping drivers for certain namespaces.
Tags
Table of Contents
Properties
- $defaultDriver : MappingDriver|null
- The default driver.
- $drivers : array<string, MappingDriver>
Methods
- addDriver() : void
- Adds a nested driver.
- getAllClassNames() : array<int, string>
- Gets the names of all mapped classes known to this driver.
- getDefaultDriver() : MappingDriver|null
- Gets the default driver.
- getDrivers() : array<string, MappingDriver>
- Gets the array of nested drivers.
- isTransient() : bool
- Returns whether the class with the specified name should have its metadata loaded.
- loadMetadataForClass() : void
- Loads the metadata for the specified class into the provided container.
- setDefaultDriver() : void
- Set the default driver.
Properties
$defaultDriver
The default driver.
private
MappingDriver|null
$defaultDriver
$drivers
private
array<string, MappingDriver>
$drivers
= []
Methods
addDriver()
Adds a nested driver.
public
addDriver(MappingDriver $nestedDriver, string $namespace) : void
Parameters
- $nestedDriver : MappingDriver
- $namespace : string
getAllClassNames()
Gets the names of all mapped classes known to this driver.
public
getAllClassNames() : array<int, string>
Return values
array<int, string> —The names of all mapped classes known to this driver.
getDefaultDriver()
Gets the default driver.
public
getDefaultDriver() : MappingDriver|null
Return values
MappingDriver|nullgetDrivers()
Gets the array of nested drivers.
public
getDrivers() : array<string, MappingDriver>
Return values
array<string, MappingDriver> —$drivers
isTransient()
Returns whether the class with the specified name should have its metadata loaded.
public
isTransient(string $className) : bool
Parameters
- $className : string
Return values
boolloadMetadataForClass()
Loads the metadata for the specified class into the provided container.
public
loadMetadataForClass(string $className, ClassMetadata $metadata) : void
Parameters
- $className : string
- $metadata : ClassMetadata
setDefaultDriver()
Set the default driver.
public
setDefaultDriver(MappingDriver $driver) : void
Parameters
- $driver : MappingDriver