Jobbuddy
Chargement...
Recherche...
Aucune correspondance
Référence de la classe FilesystemLoader
Graphe d'héritage de FilesystemLoader:
LoaderInterface

Fonctions membres publiques

 __construct ($paths=[], ?string $rootPath=null)
 getPaths (string $namespace=self::MAIN_NAMESPACE)
 getNamespaces ()
 setPaths ($paths, string $namespace=self::MAIN_NAMESPACE)
 addPath (string $path, string $namespace=self::MAIN_NAMESPACE)
 prependPath (string $path, string $namespace=self::MAIN_NAMESPACE)
 getSourceContext (string $name)
 getCacheKey (string $name)
 exists (string $name)
 isFresh (string $name, int $time)

Champs de données

const MAIN_NAMESPACE = '__main__'

Fonctions membres protégées

 findTemplate (string $name, bool $throw=true)

Attributs protégés

 $paths = []
 $cache = []
 $errorCache = []

Description détaillée

Loads template from the filesystem.

Auteur
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( $paths = [],
?string $rootPath = null )
Paramètres
string | string[]$pathsA path or an array of paths where to look for templates
string | null$rootPathThe root path common to all relative paths (null for getcwd())

Documentation des fonctions membres

◆ addPath()

addPath ( string $path,
string $namespace = self::MAIN_NAMESPACE )
Exceptions
LoaderError

◆ exists()

exists ( string $name)
Renvoie
bool

Implémente LoaderInterface.

◆ findTemplate()

findTemplate ( string $name,
bool $throw = true )
protected
Renvoie
string|null

◆ getCacheKey()

getCacheKey ( string $name)

Gets the cache key to use for the cache for a given template name.

Exceptions
LoaderErrorWhen $name is not found

Implémente LoaderInterface.

◆ getNamespaces()

getNamespaces ( )

Returns the path namespaces.

The main namespace is always defined.

Renvoie
list<string>

◆ getPaths()

getPaths ( string $namespace = self::MAIN_NAMESPACE)

Returns the paths to the templates.

Renvoie
list<string>

◆ getSourceContext()

getSourceContext ( string $name)

Returns the source context for a given template logical name.

Exceptions
LoaderErrorWhen $name is not found

Implémente LoaderInterface.

◆ isFresh()

isFresh ( string $name,
int $time )
Paramètres
int$timeTimestamp of the last modification time of the cached template
Exceptions
LoaderErrorWhen $name is not found

Implémente LoaderInterface.

◆ prependPath()

prependPath ( string $path,
string $namespace = self::MAIN_NAMESPACE )
Exceptions
LoaderError

◆ setPaths()

setPaths ( $paths,
string $namespace = self::MAIN_NAMESPACE )
Paramètres
string | string[]$pathsA path or an array of paths where to look for templates

Documentation des champs

◆ MAIN_NAMESPACE

const MAIN_NAMESPACE = '__main__'

Identifier of the main namespace.


La documentation de cette classe a été générée à partir du fichier suivant :