Adds string template functionality to any class by providing methods to load and parse string templates.
This trait requires the implementing class to provide a config()
method for reading/updating templates. An implementation of this method is provided by Cake\Core\InstanceConfigTrait
$_templater
protected formatTemplate( string $name , array $data )
Formats a template string with $data
$name
$data
getTemplates( string|null $template null )
Gets templates to use or a specific template.
$template
optional null setTemplates( array $templates )
Sets templates to use.
$templates
templater( )
Returns the templater instance.
Cake\View\StringTemplate
templates( string|null|array $templates null )
Gets/sets templates to use.
$templates
optional null null or string allow reading templates. An array allows templates to be added.
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.View.StringTemplateTrait.html