class DefaultPackageProvider extends AbstractPackageProvider (View source)

The standard package entity manager provider. If the package enables legacy namespaces, the provider simply creates a namespace at Concrete\Package\PackageHandle\Src, and considers all classes found at package/package_handle/src potential entities. If the legacy namespace is not enabled, we look for entities at Concrete\Package\PackageHandle\Entity, which maps to packages/package_handle/src/Entity. Additionally, by default any additional autoloader registries are all considered possible entity locations and namespaces.

Any package that contains Doctrine entities should consider overriding Concrete\Core\Package\Package::getEntityManagerProvider with a custom method that delivers a tailored class implementing the of the Concrete\Core\Database\EntityManager\Provider\ProviderInterface interface. Class DefaultPackageProvider

Properties

protected Package $pkg from AbstractPackageProvider
protected Application $app from AbstractPackageProvider

Methods

__construct(Application $app, Package $pkg)

Constructor

CachedReader
getLegacyAnnotationReader()

Get LegacyAnnotationReader

CachedReader
getStandardAnnotationReader()

Get StandardAnnotationReader

CachedReader
getAnnotationReader()

Get the correct AnnotationReader based on the packages support for LegacyCore

bool
packageSupportsLegacyCore()

Package supports legacy core

getDrivers()

No description

Details

__construct(Application $app, Package $pkg)

Constructor

Parameters

Application $app
Package $pkg

protected CachedReader getLegacyAnnotationReader()

Get LegacyAnnotationReader

Return Value

CachedReader with a \Doctrine\Common\Annotations\SimpleAnnotationReader

protected CachedReader getStandardAnnotationReader()

Get StandardAnnotationReader

Return Value

CachedReader with a \Doctrine\Common\Annotations\AnnotationReader

protected CachedReader getAnnotationReader()

Get the correct AnnotationReader based on the packages support for LegacyCore

Return Value

CachedReader

protected bool packageSupportsLegacyCore()

Package supports legacy core

Return Value

bool

DriverInterface[] getDrivers()

Return Value

DriverInterface[]