PHP Class Collective\Annotations\AnnotationScanner

Inheritance: use trait NamespaceToPathConverterTrait
Datei anzeigen Open project: laravelcollective/annotations Class Usage Examples

Protected Properties

Property Type Description
$namespaces string Namespaces to check for annotation reader annotation classes.
$scan array The paths to scan for annotations.

Public Methods

Method Description
__construct ( array $scan ) : void Create a new scanner instance.
addAnnotationNamespace ( string $namespace, string $path = null ) Add an annotation namespace for the SimpleAnnotationReader instance.
create ( array $scan ) : static Create a new scanner instance.
registerAnnotationsPathWithRegistry ( string $path ) Register the annotator files with the annotation registry.
setClassesToScan ( array $scans ) Set the classes to scan.

Protected Methods

Method Description
getClassesToScan ( ) : array Get all of the ReflectionClass instances in the scan array.
getReader ( ) : Doctrine\Common\Annotations\SimpleAnnotationReader Get an annotation reader instance.

Method Details

__construct() public method

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

addAnnotationNamespace() public method

If the second parameter is null, it will assume the namespace is PSR-4'd inside your app folder.
public addAnnotationNamespace ( string $namespace, string $path = null )
$namespace string
$path 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 array.
protected getClassesToScan ( ) : array
return array

getReader() protected method

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

registerAnnotationsPathWithRegistry() public method

Register the annotator files with the annotation registry.

setClassesToScan() public method

Set the classes to scan.
public setClassesToScan ( array $scans )
$scans array

Property Details

$namespaces protected_oe property

Namespaces to check for annotation reader annotation classes.
protected string $namespaces
return string

$scan protected_oe property

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