class XmlProvider implements ProviderInterface (View source)

Use this provider if you wish to store your entity metadata in XML files.

The Provider adds automatically the default mapping information for the package Expected location for the YAML mapping files: packageDir/config/xml Expected namespace for the entites: Concrete\Packages\PackageXYZ\Entity

The default mapping information can be omitted by setting $useDefaultSettings to false. In this case, the mapping information (Namespace, DoctrineMappingDriver) has to be added manually with the method addDriver().

Properties

protected $locations
protected array $drivers

Methods

__construct(ProviderInterface $pkg, boolean $useDefaultSettings = true)

Constructor

getDrivers()

No description

addDriver(string $namespace, string|array $locations)

Add additional driver

Details

__construct(ProviderInterface $pkg, boolean $useDefaultSettings = true)

Constructor

Parameters

ProviderInterface $pkg
boolean $useDefaultSettings if it's set to false, no default mapping information will be added to the drivers array

DriverInterface[] getDrivers()

Return Value

DriverInterface[]

addDriver(string $namespace, string|array $locations)

Add additional driver

Parameters

string $namespace
string|array $locations