DisconnectedMetadataFactory
in package
This class provides methods to access Doctrine entity class metadata for a given bundle, namespace or entity class, for generation purposes
Table of Contents
Properties
Methods
- __construct() : mixed
- findNamespaceAndPathForMetadata() : mixed
- Find and configure path and namespace for the metadata collection.
- getBundleMetadata() : ClassMetadataCollection
- Gets the metadata of all classes of a bundle.
- getClassMetadata() : ClassMetadataCollection
- Gets the metadata of a class.
- getNamespaceMetadata() : ClassMetadataCollection
- Gets the metadata of all classes of a namespace.
- getAllMetadata() : array<string|int, ClassMetadata>
- getBasePathForClass() : string
- Get a base path for a class
- getMetadataForClass() : ClassMetadataCollection
- getMetadataForNamespace() : ClassMetadataCollection
Properties
$registry
private
ManagerRegistry
$registry
Methods
__construct()
public
__construct(ManagerRegistry $registry) : mixed
Parameters
- $registry : ManagerRegistry
findNamespaceAndPathForMetadata()
Find and configure path and namespace for the metadata collection.
public
findNamespaceAndPathForMetadata(ClassMetadataCollection $metadata[, string|null $path = null ]) : mixed
Parameters
- $metadata : ClassMetadataCollection
- $path : string|null = null
Tags
getBundleMetadata()
Gets the metadata of all classes of a bundle.
public
getBundleMetadata(BundleInterface $bundle) : ClassMetadataCollection
Parameters
- $bundle : BundleInterface
-
A BundleInterface instance
Tags
Return values
ClassMetadataCollection —A ClassMetadataCollection instance
getClassMetadata()
Gets the metadata of a class.
public
getClassMetadata(string $class[, string $path = null ]) : ClassMetadataCollection
Parameters
- $class : string
-
A class name
- $path : string = null
-
The path where the class is stored (if known)
Tags
Return values
ClassMetadataCollection —A ClassMetadataCollection instance
getNamespaceMetadata()
Gets the metadata of all classes of a namespace.
public
getNamespaceMetadata(string $namespace[, string $path = null ]) : ClassMetadataCollection
Parameters
- $namespace : string
-
A namespace name
- $path : string = null
-
The path where the class is stored (if known)
Tags
Return values
ClassMetadataCollection —A ClassMetadataCollection instance
getAllMetadata()
private
getAllMetadata() : array<string|int, ClassMetadata>
Return values
array<string|int, ClassMetadata>getBasePathForClass()
Get a base path for a class
private
getBasePathForClass(string $name, string $namespace, string $path) : string
Parameters
- $name : string
- $namespace : string
- $path : string
Tags
Return values
stringgetMetadataForClass()
private
getMetadataForClass(string $entity) : ClassMetadataCollection
Parameters
- $entity : string
Return values
ClassMetadataCollectiongetMetadataForNamespace()
private
getMetadataForNamespace(string $namespace) : ClassMetadataCollection
Parameters
- $namespace : string