Свойство | Тип | Описание | |
---|---|---|---|
$classNames | array | The array of class names. | |
$extensions | array | Extensions of the files to read |
Метод | Описание | |
---|---|---|
__construct ( |
||
addExtension ( string $extension ) | Add an extension to look for classes | |
create ( array | string $paths = [] ) : |
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 |
public __construct ( |
||
$reader |
public addExtension ( string $extension ) | ||
$extension | string | - can be a string or an array of extensions |
public getAllClassNames ( ) : array | ||
Результат | array | $classes |
public isDrestResource ( string $className ) : boolean | ||
$className | string | |
Результат | boolean |
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 |
protected processMethods ( ReflectionMethod[] $methods, Drest\Mapping\ClassMetaData $metadata ) | ||
$methods | ReflectionMethod[] | |
$metadata | Drest\Mapping\ClassMetaData |
public static register ( ) |
public static registerAnnotations ( ) |
public removeExtensions ( string $extension = null ) | ||
$extension | string |
protected array $classNames | ||
Результат | array |
protected array $extensions | ||
Результат | array |