Applied fixes from StyleCI
This commit is contained in:
parent
2c120186f7
commit
9c6fbfbb4f
1 changed files with 11 additions and 6 deletions
|
@ -25,7 +25,7 @@ class Template
|
||||||
private $fallbackOptions;
|
private $fallbackOptions;
|
||||||
|
|
||||||
// Initialise templating engine and data
|
// Initialise templating engine and data
|
||||||
function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
// Set template to default
|
// Set template to default
|
||||||
$this->setTemplate(Configuration::getConfig('site_style'));
|
$this->setTemplate(Configuration::getConfig('site_style'));
|
||||||
|
@ -35,7 +35,8 @@ class Template
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set a template name
|
// Set a template name
|
||||||
public function setTemplate($name) {
|
public function setTemplate($name)
|
||||||
|
{
|
||||||
// Assign config path to a variable so we don't have to type it out twice
|
// Assign config path to a variable so we don't have to type it out twice
|
||||||
$confPath = ROOT . '_sakura/templates/' . $name . '/template.ini';
|
$confPath = ROOT . '_sakura/templates/' . $name . '/template.ini';
|
||||||
|
|
||||||
|
@ -60,7 +61,8 @@ class Template
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialise main template engine
|
// Initialise main template engine
|
||||||
public function initTemplate() {
|
public function initTemplate()
|
||||||
|
{
|
||||||
// Initialise Twig Filesystem Loader
|
// Initialise Twig Filesystem Loader
|
||||||
$twigLoader = new Twig_Loader_Filesystem(ROOT . '_sakura/templates/' . $this->templateName);
|
$twigLoader = new Twig_Loader_Filesystem(ROOT . '_sakura/templates/' . $this->templateName);
|
||||||
|
|
||||||
|
@ -80,7 +82,8 @@ class Template
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set a fallback
|
// Set a fallback
|
||||||
private function setFallback($name) {
|
private function setFallback($name)
|
||||||
|
{
|
||||||
// Assign config path to a variable so we don't have to type it out twice
|
// Assign config path to a variable so we don't have to type it out twice
|
||||||
$confPath = ROOT . '_sakura/templates/' . $name . '/template.ini';
|
$confPath = ROOT . '_sakura/templates/' . $name . '/template.ini';
|
||||||
|
|
||||||
|
@ -105,7 +108,8 @@ class Template
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialise main fallback engine
|
// Initialise main fallback engine
|
||||||
public function initFallback() {
|
public function initFallback()
|
||||||
|
{
|
||||||
// Initialise Twig Filesystem Loader
|
// Initialise Twig Filesystem Loader
|
||||||
$twigLoader = new Twig_Loader_Filesystem(ROOT . '_sakura/templates/' . $this->fallbackName);
|
$twigLoader = new Twig_Loader_Filesystem(ROOT . '_sakura/templates/' . $this->fallbackName);
|
||||||
|
|
||||||
|
@ -125,7 +129,8 @@ class Template
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set variables
|
// Set variables
|
||||||
public function setVariables($vars) {
|
public function setVariables($vars)
|
||||||
|
{
|
||||||
$this->vars = array_merge($this->vars, $vars);
|
$this->vars = array_merge($this->vars, $vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue