\PhugOptimizer

Summary

Methods
Properties
Constants
__construct()
resolve()
isExpired()
displayFile()
renderFile()
call()
No public properties found
FACADE
No protected methods found
No protected properties found
N/A
hashPrint()
hasExpiredImport()
$options
$paths
$cacheDirectory
$locator
N/A

Constants

FACADE

FACADE

Facade for rendering fallback.

Properties

$options

$options : array

Rendering options.

Type

array

$paths

$paths : array

Templates directories.

Type

array

$cacheDirectory

$cacheDirectory : string

Cache directory.

Type

string

Methods

__construct()

__construct(array  $options = array()) 

Parameters

array $options

resolve()

resolve(string  $file) : boolean|null|string

Resolve a template file path.

Parameters

string $file

Returns

boolean|null|string

isExpired()

isExpired(string  $file,   $cachePath = null) : boolean

Returns true is a template file is expired, false else.

$cachePath will be set with the template cache file path.

Parameters

string $file
$cachePath

Returns

boolean

displayFile()

displayFile(string  $__pug_file, array  $__pug_parameters = array()) 

Display a template.

Parameters

string $__pug_file
array $__pug_parameters

renderFile()

renderFile(string  $file, array  $parameters = array()) : string

Returns a rendered template file.

Parameters

string $file
array $parameters

Returns

string

call()

call(string  $name, array  $arguments = array(), array  $options = array()) : mixed

Call an optimizer method statically.

Parameters

string $name

method name

array $arguments

method argument to be passed

array $options

options the optimizer will be created with

Returns

mixed

hashPrint()

hashPrint(string  $input) : string

Return a hashed print from input file or content.

Parameters

string $input

Returns

string

hasExpiredImport()

hasExpiredImport(  $sourcePath,   $cachePath) : boolean

Returns true if the path has an expired imports linked.

Parameters

$sourcePath
$cachePath

Returns

boolean