| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function __construct(\SSpkS\Config $config) |
||
| 17 | { |
||
| 18 | $this->config = $config; |
||
| 19 | $tplBase = $this->config->basePath . DIRECTORY_SEPARATOR . $this->config->paths['themes']; |
||
| 20 | $tplBase .= $this->config->site['theme'] . DIRECTORY_SEPARATOR . 'templates'; |
||
| 21 | |||
| 22 | $this->mustache = new Mustache_Engine(array( |
||
| 23 | 'loader' => new Mustache_Loader_FilesystemLoader($tplBase), |
||
| 24 | 'partials_loader' => new Mustache_Loader_FilesystemLoader($tplBase . '/partials'), |
||
| 25 | 'charset' => 'utf-8', |
||
| 26 | 'logger' => new Mustache_Logger_StreamLogger('php://stderr'), |
||
| 27 | )); |
||
| 28 | |||
| 29 | $this->setVariable('siteName', $this->config->site['name']); |
||
| 30 | $this->setVariable('baseUrl', $this->config->baseUrl); |
||
| 31 | $this->setVariable('baseUrlRelative', $this->config->baseUrlRelative); |
||
|
|
|||
| 32 | $this->setVariable('themeUrl', $this->config->baseUrlRelative . $this->config->paths['themes'] . $this->config->site['theme'] . '/'); |
||
| 33 | $this->setVariable('requestUri', $_SERVER['REQUEST_URI']); |
||
| 34 | } |
||
| 35 | |||
| 52 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.