FileAccess Orion

TemplateLocator
in package
implements FileLocatorInterface

TemplateLocator locates templates in bundles.

Tags
author

Fabien Potencier fabien@symfony.com

deprecated

since version 4.3, to be removed in 5.0; use Twig instead.

Interfaces, Classes, Traits and Enums

FileLocatorInterface

Table of Contents

$cache  : mixed
$locator  : mixed
$cacheHits  : mixed
__construct()  : mixed
locate()  : string
Returns a full path for a given file.
getCacheKey()  : string
Returns a full path for a given file.

Properties

Methods

locate()

Returns a full path for a given file.

public locate(TemplateReferenceInterface $template[, string $currentPath = null ][, bool $first = true ]) : string
Parameters
$template : TemplateReferenceInterface

A template

$currentPath : string = null

Unused

$first : bool = true

Unused

Tags
throws
InvalidArgumentException

When the template is not an instance of TemplateReferenceInterface

throws
InvalidArgumentException

When the template file can not be found

Return values
string

The full path for the file

getCacheKey()

Returns a full path for a given file.

protected getCacheKey(mixed $template) : string
Parameters
$template : mixed
Return values
string

The full path for the file

Search results