PHP 클래스 Drest\Mapping\Driver\AnnotationDriver

Doesn't require paths / file extensions as entities are pull from the doctrine entity manager
상속: extends AbstractDriver
파일 보기 프로젝트 열기: leedavis81/drest 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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