PHP Класс Drest\Mapping\Driver\AnnotationDriver

Doesn't require paths / file extensions as entities are pull from the doctrine entity manager
Наследование: extends AbstractDriver
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$classNames array The array of class names.
$extensions array Extensions of the files to read

Открытые методы

Метод Описание
__construct ( AnnotationReader $reader, $paths = [] )
addExtension ( string $extension ) Add an extension to look for classes
create ( array | string $paths = [] ) : AnnotationDriver Factory method for the Annotation Driver
getAllClassNames ( ) : array Get all the metadata class names known to this driver.
isDrestResource ( string $className ) : boolean Does the class contain a drest resource object
loadMetadataForClass ( object | string $className ) : Drest\Mapping\ClassMetaData | null Load metadata for a class name
register ( ) Driver registration template method.
registerAnnotations ( ) Register out annotation classes with the annotation registry.
removeExtensions ( string $extension = null ) Remove all registered extensions, if an extension name is passed, only remove that entry

Защищенные методы

Метод Описание
processMethods ( ReflectionMethod[] $methods, Drest\Mapping\ClassMetaData $metadata ) Process the method

Описание методов

__construct() публичный Метод

public __construct ( AnnotationReader $reader, $paths = [] )
$reader Doctrine\Common\Annotations\AnnotationReader

addExtension() публичный Метод

Add an extension to look for classes
public addExtension ( string $extension )
$extension string - can be a string or an array of extensions

create() публичный статический Метод

Factory method for the Annotation Driver
public static create ( array | string $paths = [] ) : AnnotationDriver
$paths array | string
Результат AnnotationDriver

getAllClassNames() публичный Метод

Get all the metadata class names known to this driver.
public getAllClassNames ( ) : array
Результат array $classes

isDrestResource() публичный Метод

Does the class contain a drest resource object
public isDrestResource ( string $className ) : boolean
$className string
Результат boolean

loadMetadataForClass() публичный Метод

Load metadata for a class name
public loadMetadataForClass ( object | string $className ) : Drest\Mapping\ClassMetaData | null
$className object | string - Pass in either the class name, or an instance of that class
Результат Drest\Mapping\ClassMetaData | null $metaData - return null if metadata couldn't be populated from annotations

processMethods() защищенный Метод

Process the method
protected processMethods ( ReflectionMethod[] $methods, Drest\Mapping\ClassMetaData $metadata )
$methods ReflectionMethod[]
$metadata Drest\Mapping\ClassMetaData

register() публичный статический Метод

Driver registration template method.
public static register ( )

registerAnnotations() публичный статический Метод

Register out annotation classes with the annotation registry.
public static registerAnnotations ( )

removeExtensions() публичный Метод

Remove all registered extensions, if an extension name is passed, only remove that entry
public removeExtensions ( string $extension = null )
$extension string

Описание свойств

$classNames защищенное свойство

The array of class names.
protected array $classNames
Результат array

$extensions защищенное свойство

Extensions of the files to read
protected array $extensions
Результат array