PHP Class Webiny\Component\TemplateEngine\Bridge\TemplateEngine

Inheritance: use trait Webiny\Component\StdLib\StdLibTrait
Mostra file Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
getInstance ( string $engineName, ConfigObject $config ) : Webiny\Component\TemplateEngine\Bridge\TemplateEngineInterface Create an instance of an TemplateEngine driver.
setLibrary ( string $engineName, string $pathToClass ) Change the default library used for the driver.

Private Methods

Method Description
getLibrary ( string $engineName ) : string Get the name of bridge library which will be used as the driver.

Method Details

getInstance() public static method

Create an instance of an TemplateEngine driver.
public static getInstance ( string $engineName, ConfigObject $config ) : Webiny\Component\TemplateEngine\Bridge\TemplateEngineInterface
$engineName string Name of the template engine for which to load the instance.
$config Webiny\Component\Config\ConfigObject Template engine config.
return Webiny\Component\TemplateEngine\Bridge\TemplateEngineInterface

setLibrary() public static method

Change the default library used for the driver.
public static setLibrary ( string $engineName, string $pathToClass )
$engineName string Name of the template engine for which to set the bridge library.
$pathToClass string Path to the new driver class. Must be an instance of \Webiny\Bridge\Cache\CacheInterface