class FileLoader implements Loader

Template loader.

Properties

protected string|null $baseDir

Methods

__construct(string|null $baseDir = null)

No description

string
getContent($fileName)

Returns template source code.

bool
isExpired($file, int $time)

Checks whether template is expired.

string
getReferredName($file, $referringFile)

Returns referred template name.

string
getUniqueId($file)

Returns unique identifier for caching.

static string
normalizePath(string $path)

No description

Details

at line 26
__construct(string|null $baseDir = null)

No description

Parameters

string|null $baseDir

at line 35
string getContent($fileName)

Returns template source code.

Parameters

$fileName

Return Value

string

at line 54
bool isExpired($file, int $time)

Checks whether template is expired.

Parameters

$file
int $time

Return Value

bool

at line 64
string getReferredName($file, $referringFile)

Returns referred template name.

Parameters

$file
$referringFile

Return Value

string

at line 77
string getUniqueId($file)

Returns unique identifier for caching.

Parameters

$file

Return Value

string

at line 83
static protected string normalizePath(string $path)

No description

Parameters

string $path

Return Value

string

Traits

Better OOP experience.