PHP Class Adamgoose\Events\Annotations\Scanner

Show file Open project: adamgoose/laravel-annotations Class Usage Examples

Protected Properties

Property Type Description
$scan array The classes to scan for annotations.

Public Methods

Method Description
__construct ( array $scan ) : void Create a new event scanner instance.
create ( array $scan ) : static Create a new scanner instance.
getEventDefinitions ( ) : string Convert the scanned annotations into route definitions.

Protected Methods

Method Description
buildListener ( string $class, string $method, array $events ) : string Build the event listener for the class and method.
getClassesToScan ( ) : array Get all of the ReflectionClass instances in the scan path.
getReader ( ) : Doctrine\Common\Annotations\SimpleAnnotationReader Get an annotation reader instance.

Method Details

__construct() public method

Create a new event scanner instance.
public __construct ( array $scan ) : void
$scan array
return void

buildListener() protected method

Build the event listener for the class and method.
protected buildListener ( string $class, string $method, array $events ) : string
$class string
$method string
$events array
return string

create() public static method

Create a new scanner instance.
public static create ( array $scan ) : static
$scan array
return static

getClassesToScan() protected method

Get all of the ReflectionClass instances in the scan path.
protected getClassesToScan ( ) : array
return array

getEventDefinitions() public method

Convert the scanned annotations into route definitions.
public getEventDefinitions ( ) : string
return string

getReader() protected method

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

Property Details

$scan protected property

The classes to scan for annotations.
protected array $scan
return array