PHP Class Adamgoose\Routing\Annotations\Scanner

Afficher le fichier Open project: adamgoose/laravel-annotations Class Usage Examples

Protected Properties

Свойство Type Description
$scan array The path to scan for annotations.

Méthodes publiques

Méthode Description
__construct ( array $scan ) : void Create a new scanner instance.
create ( array $scan ) : static Create a new scanner instance.
getRouteDefinitions ( ) : string Convert the scanned annotations into route definitions.

Méthodes protégées

Méthode Description
addEndpoint ( EndpointCollection $endpoints, ReflectionClass $class, string $method, array $annotations ) : void Create a new endpoint in the collection.
getClassesToScan ( ) : array Get all of the ReflectionClass instances in the scan array.
getEndpointsInClass ( ReflectionClass $class, AnnotationSet $annotations ) : EndpointCollection Build the Endpoints for the given class.
getEndpointsInClasses ( Doctrine\Common\Annotations\SimpleAnnotationReader $reader ) : EndpointCollection Scan the directory and generate the route manifest.
getReader ( ) : Doctrine\Common\Annotations\SimpleAnnotationReader Get an annotation reader instance.

Method Details

__construct() public méthode

Create a new scanner instance.
public __construct ( array $scan ) : void
$scan array
Résultat void

addEndpoint() protected méthode

Create a new endpoint in the collection.
protected addEndpoint ( EndpointCollection $endpoints, ReflectionClass $class, string $method, array $annotations ) : void
$endpoints EndpointCollection
$class ReflectionClass
$method string
$annotations array
Résultat void

create() public static méthode

Create a new scanner instance.
public static create ( array $scan ) : static
$scan array
Résultat static

getClassesToScan() protected méthode

Get all of the ReflectionClass instances in the scan array.
protected getClassesToScan ( ) : array
Résultat array

getEndpointsInClass() protected méthode

Build the Endpoints for the given class.
protected getEndpointsInClass ( ReflectionClass $class, AnnotationSet $annotations ) : EndpointCollection
$class ReflectionClass
$annotations AnnotationSet
Résultat EndpointCollection

getEndpointsInClasses() protected méthode

Scan the directory and generate the route manifest.
protected getEndpointsInClasses ( Doctrine\Common\Annotations\SimpleAnnotationReader $reader ) : EndpointCollection
$reader Doctrine\Common\Annotations\SimpleAnnotationReader
Résultat EndpointCollection

getReader() protected méthode

Get an annotation reader instance.
protected getReader ( ) : Doctrine\Common\Annotations\SimpleAnnotationReader
Résultat Doctrine\Common\Annotations\SimpleAnnotationReader

getRouteDefinitions() public méthode

Convert the scanned annotations into route definitions.
public getRouteDefinitions ( ) : string
Résultat string

Property Details

$scan protected_oe property

The path to scan for annotations.
protected array $scan
Résultat array