PhpFileLoader
        
        extends FileLoader
    
    
            
            in package
            
        
    
    
    
        
            PhpFileLoader loads routes from a PHP file.
The file must return a RouteCollection instance.
Tags
Table of Contents
- $env : mixed
 - $loading : mixed
 - $locator : mixed
 - $resolver : mixed
 - $currentDir : mixed
 - __construct() : mixed
 - getLocator() : FileLocatorInterface
 - Returns the file locator used by this loader.
 - getResolver() : LoaderResolverInterface
 - Gets the loader resolver.
 - import() : mixed
 - Imports a resource.
 - load() : RouteCollection
 - Loads a PHP file.
 - resolve() : LoaderInterface
 - Finds a loader able to load an imported resource.
 - setCurrentDir() : mixed
 - Sets the current directory.
 - setResolver() : mixed
 - Sets the loader resolver.
 - supports() : mixed
 - {@inheritdoc}
 - callConfigurator() : RouteCollection
 - doImport() : mixed
 
Properties
$env
    protected
        mixed
    $env
    
        
        
    
$loading
    protected
    static    mixed
    $loading
     = []
        
        
    
$locator
    protected
        mixed
    $locator
    
        
        
    
$resolver
    protected
        mixed
    $resolver
    
        
        
    
$currentDir
    private
        mixed
    $currentDir
    
        
        
    
Methods
__construct()
    public
                __construct([string|null $env = null ]) : mixed
        
        Parameters
- $env : string|null = null
 
Return values
mixed —getLocator()
Returns the file locator used by this loader.
    public
                getLocator() : FileLocatorInterface
    
    
    
        Return values
FileLocatorInterface —getResolver()
Gets the loader resolver.
    public
                getResolver() : LoaderResolverInterface
    
    
    
        Return values
LoaderResolverInterface —import()
Imports a resource.
    public
                import(mixed $resource[, string|null $type = null ]) : mixed
    
        Parameters
- $resource : mixed
 - 
                    
A resource
 - $type : string|null = null
 - 
                    
The resource type or null if unknown
 
Return values
mixed —load()
Loads a PHP file.
    public
                load(string $file[, string|null $type = null ]) : RouteCollection
    
        Parameters
- $file : string
 - 
                    
A PHP file path
 - $type : string|null = null
 - 
                    
The resource type
 
Return values
RouteCollection —resolve()
Finds a loader able to load an imported resource.
    public
                resolve(mixed $resource[, string|null $type = null ]) : LoaderInterface
    
        Parameters
- $resource : mixed
 - 
                    
A resource
 - $type : string|null = null
 - 
                    
The resource type or null if unknown
 
Tags
Return values
LoaderInterface —setCurrentDir()
Sets the current directory.
    public
                setCurrentDir(string $dir) : mixed
    
        Parameters
- $dir : string
 
Return values
mixed —setResolver()
Sets the loader resolver.
    public
                setResolver(LoaderResolverInterface $resolver) : mixed
    
        Parameters
- $resolver : LoaderResolverInterface
 
Return values
mixed —supports()
{@inheritdoc}
    public
                supports(mixed $resource[, string|null $type = null ]) : mixed
    
        Parameters
- $resource : mixed
 - $type : string|null = null
 
Return values
mixed —callConfigurator()
    protected
                callConfigurator(callable $result, string $path, string $file) : RouteCollection
        
        Parameters
- $result : callable
 - $path : string
 - $file : string
 
Return values
RouteCollection —doImport()
    private
                doImport(mixed $resource[, string|null $type = null ][, bool $ignoreErrors = false ][, string|null $sourceResource = null ]) : mixed
        
        Parameters
- $resource : mixed
 - $type : string|null = null
 - $ignoreErrors : bool = false
 - $sourceResource : string|null = null