ServiceProviderLoader
in package
Class ServiceProviderLoader
Table of Contents
- $path : Path
- __construct() : mixed
- ServiceProviderLoader constructor.
- provideModulesServiceProviderSuffix() : array<string|int, mixed>
- Provides a list of
- provideSubmodulesServiceProviderSuffix() : array<string|int, mixed>
- changePathToNamespace() : array<string|int, mixed>
- Modifies the given array of paths to service providers, building the latter part of the service providers' namespace.
- dirIterator() : IteratorIterator|array<string|int, DirectoryIterator>
- Directory iterator utility method.
- findServiceProviders() : array<string|int, mixed>
- Iterates through the given module paths and search for classes ending with "ServiceProvider.php".
- findSubmodulePaths() : array<string|int, mixed>
- Find submodule paths.
- getModulesPaths() : array<string|int, mixed>
- Returns a list of module paths.
- strEndsWithServiceProvider() : bool
- Checks if $haystack ends with "ServiceProvider.php".
Properties
$path
private
Path
$path
Methods
__construct()
ServiceProviderLoader constructor.
public
__construct(Path $path) : mixed
Parameters
- $path : Path
Return values
mixed —provideModulesServiceProviderSuffix()
Provides a list of
public
provideModulesServiceProviderSuffix(string $modulesDirectory) : array<string|int, mixed>
Parameters
- $modulesDirectory : string
Return values
array<string|int, mixed> —provideSubmodulesServiceProviderSuffix()
public
provideSubmodulesServiceProviderSuffix(string $modulesDirectory) : array<string|int, mixed>
Parameters
- $modulesDirectory : string
Return values
array<string|int, mixed> —changePathToNamespace()
Modifies the given array of paths to service providers, building the latter part of the service providers' namespace.
private
changePathToNamespace(array<string|int, mixed> $submoduleServiceProviders) : array<string|int, mixed>
Parameters
- $submoduleServiceProviders : array<string|int, mixed>
Return values
array<string|int, mixed> —dirIterator()
Directory iterator utility method.
private
dirIterator(string $path) : IteratorIterator|array<string|int, DirectoryIterator>
Parameters
- $path : string
Return values
IteratorIterator|array<string|int, DirectoryIterator> —findServiceProviders()
Iterates through the given module paths and search for classes ending with "ServiceProvider.php".
private
findServiceProviders(array<string|int, mixed> $modulePaths) : array<string|int, mixed>
Parameters
- $modulePaths : array<string|int, mixed>
Return values
array<string|int, mixed> —findSubmodulePaths()
Find submodule paths.
private
findSubmodulePaths(array<string|int, mixed> $modulePaths) : array<string|int, mixed>
Searches in the given $modulesPaths array.
Parameters
- $modulePaths : array<string|int, mixed>
Return values
array<string|int, mixed> —getModulesPaths()
Returns a list of module paths.
private
getModulesPaths(string $modulesDirectory) : array<string|int, mixed>
Parameters
- $modulesDirectory : string
Return values
array<string|int, mixed> —strEndsWithServiceProvider()
Checks if $haystack ends with "ServiceProvider.php".
private
strEndsWithServiceProvider(string $haystack) : bool
Parameters
- $haystack : string