Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function __construct(\SSpkS\Config $config) |
||
17 | { |
||
18 | $this->config = $config; |
||
19 | |||
20 | $this->mustache = new Mustache_Engine(array( |
||
21 | 'loader' => new Mustache_Loader_FilesystemLoader($this->config->basePath . '/data/templates'), |
||
22 | 'partials_loader' => new Mustache_Loader_FilesystemLoader($this->config->basePath . '/data/templates/partials'), |
||
23 | 'charset' => 'utf-8', |
||
24 | 'logger' => new Mustache_Logger_StreamLogger('php://stderr'), |
||
25 | )); |
||
26 | |||
27 | $this->setVariable('siteName', $this->config->site['name']); |
||
28 | $this->setVariable('baseUrl', $this->config->baseUrl); |
||
29 | $this->setVariable('requestUri', $_SERVER['REQUEST_URI']); |
||
30 | } |
||
31 | |||
48 |