LazyLoadingMetadataFactory
LazyLoadingMetadataFactory
class LazyLoadingMetadataFactory implements MetadataFactoryInterface
Creates new {@link ClassMetadataInterface} instances.
Whenever {@link getMetadataFor()} is called for the first time with a given class name or object of that class, a new metadata instance is created and returned. On subsequent requests for the same class, the same metadata instance will be returned.
You can optionally pass a {@link LoaderInterface} instance to the constructor. Whenever a new metadata instance is created, it is passed to the loader, which can configure the metadata based on configuration loaded from the filesystem or a database. If you want to use multiple loaders, wrap them in a {@link LoaderChain}