Properties

$extensions

$extensions : array

List of global extensions. Class names that add custom behaviors to the engine.

Type

array

Methods

getExtensionsOptions()

getExtensionsOptions(array  $extensions, array  $options = array()) : array

Get options from extensions list and default options.

Parameters

array $extensions

list of extensions instances of class names

array $options

optional default options to merge with

Returns

array

hasExtension()

hasExtension(string  $extensionClassName) : boolean

Check if an extension is available globally.

Parameters

string $extensionClassName

Returns

boolean

addExtension()

addExtension(string  $extensionClassName) 

Add an extension to the Phug facade (will be available in the current renderer instance and next static calls).

Throws an exception if the extension is not a valid class name.

Parameters

string $extensionClassName

Throws

\Phug\PhugException

removeExtension()

removeExtension(string  $extensionClassName) 

Remove an extension from the Phug facade (remove from current renderer instance).

Parameters

string $extensionClassName

getExtensions()

getExtensions() : array

Get extensions list added through the Phug facade.

Returns

array

normalizeExtensionClassName()

normalizeExtensionClassName(  $name) 

Parameters

$name

getExtensionsGetters()

getExtensionsGetters() 

resolveExtension()

resolveExtension(  $extensionClassName) 

Parameters

$extensionClassName

getExtensionMethodResult()

getExtensionMethodResult(  $extensionClassName,   $method) 

Parameters

$extensionClassName
$method

removeExtensionFromCurrentRenderer()

removeExtensionFromCurrentRenderer(  $extensionClassName) 

Parameters

$extensionClassName

mergeOptions()

mergeOptions(  $options,   $values) 

Parameters

$options
$values

extractExtensionOptions()

extractExtensionOptions(  $options,   $extensionClassName,   $methods) 

Parameters

$options
$extensionClassName
$methods