Property | Type | Description | |
---|---|---|---|
$classNames | array | The array of class names. | |
$extensions | array | Extensions of the files to read |
Method | Description | |
---|---|---|
__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 |
Method | Description | |
---|---|---|
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 | ||
return | array | $classes |
public isDrestResource ( string $className ) : boolean | ||
$className | string | |
return | 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 |
return | 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 registerAnnotations ( ) |
public removeExtensions ( string $extension = null ) | ||
$extension | string |
protected array $classNames | ||
return | array |
protected array $extensions | ||
return | array |