/**
* templater
*
* @return \Cake\View\StringTemplate
*/
public function templater()
{
if (empty($this->_templater)) {
$class = $this->config('templateClass') ?: 'Cake\\View\\StringTemplate';
$this->_templater = new $class();
$templates = $this->config('templates');
if ($templates) {
if (is_string($templates)) {
$this->_templater->add($this->_defaultConfig['templates']);
$this->_templater->load($templates);
} else {
$this->_templater->add($templates);
}
}
}
return $this->_templater;
}