Documentation

FileLoader extends Loader
in package

AbstractYes

FileLoader is the abstract class used by all built-in loaders that are file based.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Properties

$env  : mixed
$loading  : mixed
$locator  : mixed
$resolver  : mixed
$currentDir  : string|null

Methods

__construct()  : mixed
getLocator()  : FileLocatorInterface
Returns the file locator used by this loader.
getResolver()  : LoaderResolverInterface
Gets the loader resolver.
import()  : mixed
Imports a resource.
resolve()  : LoaderInterface
Finds a loader able to load an imported resource.
setCurrentDir()  : mixed
Sets the current directory.
setResolver()  : mixed
Sets the loader resolver.
doImport()  : mixed

Properties

$resolver

protected mixed $resolver

$currentDir

private string|null $currentDir = null

Methods

import()

Imports a resource.

public import(mixed $resource[, string|null $type = null ][, bool $ignoreErrors = false ][, string|null $sourceResource = null ][, string|array<string|int, string>|null $exclude = null ]) : mixed
Parameters
$resource : mixed

A Resource

$type : string|null = null

The resource type or null if unknown

$ignoreErrors : bool = false

Whether to ignore import errors or not

$sourceResource : string|null = null

The original resource importing the new resource

$exclude : string|array<string|int, string>|null = null

Glob patterns to exclude from the import

Tags
throws
LoaderLoadException
throws
FileLoaderImportCircularReferenceException
throws
FileLocatorFileNotFoundException

setCurrentDir()

Sets the current directory.

public setCurrentDir(string $dir) : mixed
Parameters
$dir : string

doImport()

private doImport(mixed $resource[, string $type = null ][, bool $ignoreErrors = false ][, string $sourceResource = null ]) : mixed
Parameters
$resource : mixed
$type : string = null
$ignoreErrors : bool = false
$sourceResource : string = null

        
On this page

Search results