mediatekformation

ClassMetadataFactory

Contract for a Doctrine persistence layer ClassMetadata class to implement.

Tags
template

T of ClassMetadata

Table of Contents

getAllMetadata()  : array<string|int, ClassMetadata>
Forces the factory to load the metadata of all classes known to the underlying mapping driver.
getMetadataFor()  : ClassMetadata
Gets the class metadata descriptor for a class.
hasMetadataFor()  : bool
Checks whether the factory has the metadata for a class loaded already.
isTransient()  : bool
Returns whether the class with the specified name should have its metadata loaded.
setMetadataFor()  : void
Sets the metadata descriptor for a specific class.

Methods

getAllMetadata()

Forces the factory to load the metadata of all classes known to the underlying mapping driver.

public getAllMetadata() : array<string|int, ClassMetadata>
Tags
psalm-return

T[]

Return values
array<string|int, ClassMetadata> —

The ClassMetadata instances of all mapped classes.

getMetadataFor()

Gets the class metadata descriptor for a class.

public getMetadataFor(string $className) : ClassMetadata
Parameters
$className : string

The name of the class.

Tags
psalm-return

T

Return values
ClassMetadata —

hasMetadataFor()

Checks whether the factory has the metadata for a class loaded already.

public hasMetadataFor(string $className) : bool
Parameters
$className : string
Return values
bool —

TRUE if the metadata of the class in question is already loaded, FALSE otherwise.

isTransient()

Returns whether the class with the specified name should have its metadata loaded.

public isTransient(string $className) : bool

This is only the case if it is either mapped directly or as a MappedSuperclass.

Parameters
$className : string
Tags
psalm-param

class-string $className

Return values
bool —

setMetadataFor()

Sets the metadata descriptor for a specific class.

public setMetadataFor(string $className, ClassMetadata $class) : void
Parameters
$className : string
$class : ClassMetadata
Tags
psalm-param

T $class

Return values
void —

Search results