mediatekformation

GenericAnnotationParser
in package
implements ParserInterface

Generic annotation parser

Expects registration of AnnotationInterface instances. Such instances will be passed annotation content to their initialize() method, which they are then responsible for parsing.

Interfaces, Classes, Traits and Enums

ParserInterface

Table of Contents

$aliases  : array<string|int, mixed>
$annotationNames  : array<string|int, mixed>
$annotations  : array<string|int, AnnotationInterface>
hasAnnotation()  : bool
Checks if the manager has annotations for a class
onCreateAnnotation()  : false|AnnotationInterface
Listen to onCreateAnnotation, and attempt to return an annotation object instance.
registerAnnotation()  : void
Register annotations
registerAnnotations()  : GenericAnnotationParser
Register many annotations at once
setAlias()  : GenericAnnotationParser
Alias an annotation name
hasAlias()  : bool
Do we have an alias by the provided name?
normalizeAlias()  : string
Normalize an alias name
resolveAlias()  : string
Resolve an alias to a class name

Properties

Methods

hasAnnotation()

Checks if the manager has annotations for a class

public hasAnnotation(string $class) : bool
Parameters
$class : string
Return values
bool

hasAlias()

Do we have an alias by the provided name?

protected hasAlias(string $alias) : bool
Parameters
$alias : string
Return values
bool

normalizeAlias()

Normalize an alias name

protected normalizeAlias(string $alias) : string
Parameters
$alias : string
Return values
string

resolveAlias()

Resolve an alias to a class name

protected resolveAlias(string $alias) : string
Parameters
$alias : string
Return values
string

Search results