mediatekformation

AttributeDriver extends AnnotationDriver
in package

The AnnotationDriver reads the mapping metadata from docblock annotations.

Table of Contents

$classNames  : array<string|int, string>|null
Cache for AnnotationDriver#getAllClassNames().
$entityAnnotationClasses  : array<string, int>
Name of the entity annotations as keys.
$excludePaths  : array<string|int, string>
The paths excluded from path where to look for mapping files.
$fileExtension  : string
The file extension of mapping documents.
$paths  : array<string|int, string>
The paths where to look for mapping files.
$reader  : Reader
The annotation reader.
__construct()  : mixed
Initializes a new AnnotationDriver that uses the given AnnotationReader for reading docblock annotations.
addExcludePaths()  : void
Append exclude lookup paths to metadata driver.
addPaths()  : void
Appends lookup paths to metadata driver.
getAllClassNames()  : array<string|int, string>
Gets the names of all mapped classes known to this driver.
getExcludePaths()  : array<string|int, string>
Retrieve the defined metadata lookup exclude paths.
getFileExtension()  : string
Gets the file extension used to look for mapping files under.
getPaths()  : array<string|int, string>
Retrieves the defined metadata lookup paths.
getReader()  : Reader
Retrieve the current annotation reader
isTransient()  : bool
Returns whether the class with the specified name is transient. Only non-transient classes, that is entities and mapped superclasses, should have their metadata loaded.
loadMetadataForClass()  : void
setFileExtension()  : void
Sets the file extension used to look for mapping files under.
columnToArray()  : array<string|int, mixed>
Parse the given Column as array
getFetchMode()  : int
Attempts to resolve the fetch mode.
getMethodCallbacks()  : array<string|int, callable>
Parses the given method.
joinColumnToArray()  : array<string|int, mixed>
Parse the given JoinColumn as array

Properties

$classNames

Cache for AnnotationDriver#getAllClassNames().

protected array<string|int, string>|null $classNames
Tags
psalm-var

list|null

$entityAnnotationClasses

Name of the entity annotations as keys.

protected array<string, int> $entityAnnotationClasses = [\Doctrine\ORM\Mapping\Entity::class => 1, \Doctrine\ORM\Mapping\MappedSuperclass::class => 2]

$excludePaths

The paths excluded from path where to look for mapping files.

protected array<string|int, string> $excludePaths = []

$fileExtension

The file extension of mapping documents.

protected string $fileExtension = '.php'

$paths

The paths where to look for mapping files.

protected array<string|int, string> $paths = []

Methods

__construct()

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading docblock annotations.

public __construct(array<string|int, string> $paths) : mixed
Parameters
$paths : array<string|int, string>
Return values
mixed

addExcludePaths()

Append exclude lookup paths to metadata driver.

public addExcludePaths(array<string|int, string> $paths) : void
Parameters
$paths : array<string|int, string>
Return values
void

addPaths()

Appends lookup paths to metadata driver.

public addPaths(array<string|int, string> $paths) : void
Parameters
$paths : array<string|int, string>
Return values
void

getAllClassNames()

Gets the names of all mapped classes known to this driver.

public getAllClassNames() : array<string|int, string>
Return values
array<string|int, string>

The names of all mapped classes known to this driver.

getExcludePaths()

Retrieve the defined metadata lookup exclude paths.

public getExcludePaths() : array<string|int, string>
Return values
array<string|int, string>

getFileExtension()

Gets the file extension used to look for mapping files under.

public getFileExtension() : string
Return values
string

getPaths()

Retrieves the defined metadata lookup paths.

public getPaths() : array<string|int, string>
Return values
array<string|int, string>

isTransient()

Returns whether the class with the specified name is transient. Only non-transient classes, that is entities and mapped superclasses, should have their metadata loaded.

public isTransient(mixed $className) : bool
Parameters
$className : mixed
Return values
bool

setFileExtension()

Sets the file extension used to look for mapping files under.

public setFileExtension(string $fileExtension) : void
Parameters
$fileExtension : string

The file extension to set.

Return values
void

columnToArray()

Parse the given Column as array

private columnToArray(string $fieldName, Column $column) : array<string|int, mixed>
Parameters
$fieldName : string
$column : Column
Tags
psalm-return

array{ fieldName: string, type: mixed, scale: int, length: int, unique: bool, nullable: bool, precision: int, options?: mixed[], columnName?: string, columnDefinition?: string }

Return values
array<string|int, mixed>

getFetchMode()

Attempts to resolve the fetch mode.

private getFetchMode(string $className, string $fetchMode) : int
Parameters
$className : string

The class name.

$fetchMode : string

The fetch mode.

Tags
throws
MappingException

If the fetch mode is not valid.

Return values
int

The fetch mode as defined in ClassMetadata.

getMethodCallbacks()

Parses the given method.

private getMethodCallbacks(ReflectionMethod $method) : array<string|int, callable>
Parameters
$method : ReflectionMethod
Return values
array<string|int, callable>

joinColumnToArray()

Parse the given JoinColumn as array

private joinColumnToArray(JoinColumn|InverseJoinColumn $joinColumn) : array<string|int, mixed>
Parameters
$joinColumn : JoinColumn|InverseJoinColumn
Tags
psalm-return

array{ name: string|null, unique: bool, nullable: bool, onDelete: mixed, columnDefinition: string|null, referencedColumnName: string }

Return values
array<string|int, mixed>

Search results