Documentation

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

$registry  : ManagerRegistry

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

Methods

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
throws
RuntimeException

When unable to determine the path.

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
throws
RuntimeException

When namespace not contain mapped entities.

Return values
ClassMetadataCollection

A ClassMetadataCollection instance

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
throws
RuntimeException

When base path not found.

Return values
string

        
On this page

Search results