PHP Class Collective\Annotations\AnnotationsServiceProvider

Inheritance: extends Illuminate\Support\ServiceProvider, use trait Illuminate\Console\AppNamespaceDetectorTrait
Afficher le fichier Open project: laravelcollective/annotations Class Usage Examples

Protected Properties

Свойство Type Description
$commands array The commands to be registered.
$finder AnnotationFinder File finder for annotations.
$scanControllers boolean Determines whether or not to automatically scan the controllers directory (App\Http\Controllers) for routes.
$scanEvents array The classes to scan for event annotations.
$scanEverything boolean Determines whether or not to automatically scan all namespaced classes for event, route, and model annotations.
$scanModels array The classes to scan for model binding annotations.
$scanRoutes array The classes to scan for route annotations.
$scanWhenLocal boolean Determines if we will auto-scan in the local environment.

Méthodes publiques

Méthode Description
__construct ( Illuminate\Contracts\Foundation\Application $app )
addEventAnnotations ( Scanner $scanner ) Add annotation classes to the event scanner.
addModelAnnotations ( Scanner $scanner ) Add annotation classes to the model scanner.
addRoutingAnnotations ( Scanner $scanner ) Add annotation classes to the route scanner.
boot ( ) : void Register the application's annotated event listeners.
convertNamespaceToPath ( string $namespace ) : string Convert the given namespace to a file path.
eventScans ( ) : array Get the classes to be scanned by the provider.
getClassesFromNamespace ( string $namespace, null $base = null ) : array Get a list of the classes in a namespace. Leaving the second argument will scan for classes within the project's app directory.
loadAnnotatedEvents ( ) : void Load the annotated events.
modelScans ( ) : array Get the classes to be scanned by the provider.
register ( ) : void Register the service provider.
routeScans ( ) : array Get the classes to be scanned by the provider.

Méthodes protégées

Méthode Description
getAllClasses ( ) : array Get a list of classes in the root namespace.
loadAnnotatedModels ( ) : void Load the annotated models.
loadAnnotatedRoutes ( ) : void Load the annotated routes.
loadScannedEvents ( ) : void Load the scanned events for the application.
loadScannedModels ( ) : void Load the scanned application models.
loadScannedRoutes ( ) : void Load the scanned application routes.
registerCommands ( ) : void Register the commands.
registerEventScanCommand ( ) : void Register the command.
registerEventScanner ( ) : void Register the scanner.
registerModelScanCommand ( ) : void Register the command.
registerModelScanner ( ) : void Register the scanner.
registerRouteScanCommand ( ) : void Register the command.
registerRouteScanner ( ) : void Register the scanner.
scanEvents ( ) : void Scan the events for the application.
scanModels ( ) : void Scan the models and write the scanned models file.
scanRoutes ( ) : void Scan the routes and write the scanned routes file.

Method Details

__construct() public méthode

public __construct ( Illuminate\Contracts\Foundation\Application $app )
$app Illuminate\Contracts\Foundation\Application

addEventAnnotations() public méthode

Add annotation classes to the event scanner.
public addEventAnnotations ( Scanner $scanner )
$scanner Collective\Annotations\Events\Annotations\Scanner

addModelAnnotations() public méthode

Add annotation classes to the model scanner.
public addModelAnnotations ( Scanner $scanner )
$scanner Collective\Annotations\Database\Eloquent\Annotations\Scanner

addRoutingAnnotations() public méthode

Add annotation classes to the route scanner.
public addRoutingAnnotations ( Scanner $scanner )
$scanner Collective\Annotations\Routing\Annotations\Scanner

boot() public méthode

Register the application's annotated event listeners.
public boot ( ) : void
Résultat void

convertNamespaceToPath() public méthode

Convert the given namespace to a file path.
public convertNamespaceToPath ( string $namespace ) : string
$namespace string the namespace to convert
Résultat string

eventScans() public méthode

Get the classes to be scanned by the provider.
public eventScans ( ) : array
Résultat array

getAllClasses() protected méthode

Get a list of classes in the root namespace.
protected getAllClasses ( ) : array
Résultat array

getClassesFromNamespace() public méthode

Get a list of the classes in a namespace. Leaving the second argument will scan for classes within the project's app directory.
public getClassesFromNamespace ( string $namespace, null $base = null ) : array
$namespace string the namespace to search
$base null
Résultat array

loadAnnotatedEvents() public méthode

Load the annotated events.
public loadAnnotatedEvents ( ) : void
Résultat void

loadAnnotatedModels() protected méthode

Load the annotated models.
protected loadAnnotatedModels ( ) : void
Résultat void

loadAnnotatedRoutes() protected méthode

Load the annotated routes.
protected loadAnnotatedRoutes ( ) : void
Résultat void

loadScannedEvents() protected méthode

Load the scanned events for the application.
protected loadScannedEvents ( ) : void
Résultat void

loadScannedModels() protected méthode

Load the scanned application models.
protected loadScannedModels ( ) : void
Résultat void

loadScannedRoutes() protected méthode

Load the scanned application routes.
protected loadScannedRoutes ( ) : void
Résultat void

modelScans() public méthode

Get the classes to be scanned by the provider.
public modelScans ( ) : array
Résultat array

register() public méthode

Register the service provider.
public register ( ) : void
Résultat void

registerCommands() protected méthode

Register the commands.
protected registerCommands ( ) : void
Résultat void

registerEventScanCommand() protected méthode

Register the command.
protected registerEventScanCommand ( ) : void
Résultat void

registerEventScanner() protected méthode

Register the scanner.
protected registerEventScanner ( ) : void
Résultat void

registerModelScanCommand() protected méthode

Register the command.
protected registerModelScanCommand ( ) : void
Résultat void

registerModelScanner() protected méthode

Register the scanner.
protected registerModelScanner ( ) : void
Résultat void

registerRouteScanCommand() protected méthode

Register the command.
protected registerRouteScanCommand ( ) : void
Résultat void

registerRouteScanner() protected méthode

Register the scanner.
protected registerRouteScanner ( ) : void
Résultat void

routeScans() public méthode

Get the classes to be scanned by the provider.
public routeScans ( ) : array
Résultat array

scanEvents() protected méthode

Scan the events for the application.
protected scanEvents ( ) : void
Résultat void

scanModels() protected méthode

Scan the models and write the scanned models file.
protected scanModels ( ) : void
Résultat void

scanRoutes() protected méthode

Scan the routes and write the scanned routes file.
protected scanRoutes ( ) : void
Résultat void

Property Details

$commands protected_oe property

The commands to be registered.
protected array $commands
Résultat array

$finder protected_oe property

File finder for annotations.
protected AnnotationFinder,Collective\Annotations $finder
Résultat AnnotationFinder

$scanControllers protected_oe property

Determines whether or not to automatically scan the controllers directory (App\Http\Controllers) for routes.
protected bool $scanControllers
Résultat boolean

$scanEvents protected_oe property

The classes to scan for event annotations.
protected array $scanEvents
Résultat array

$scanEverything protected_oe property

Determines whether or not to automatically scan all namespaced classes for event, route, and model annotations.
protected bool $scanEverything
Résultat boolean

$scanModels protected_oe property

The classes to scan for model binding annotations.
protected array $scanModels
Résultat array

$scanRoutes protected_oe property

The classes to scan for route annotations.
protected array $scanRoutes
Résultat array

$scanWhenLocal protected_oe property

Determines if we will auto-scan in the local environment.
protected bool $scanWhenLocal
Résultat boolean