88 * @author Stefan Wanzenried <stefan.wanzenried@gmail.com>
99 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License, version 2
1010 *
11- * ProcessWire 2.x
12- * Copyright (C) 2014 by Ryan Cramer
13- * Licensed under GNU/GPL v2, see LICENSE.TXT
14- *
15- * http://processwire.com
16- *
1711 */
1812abstract class TemplateEngine extends Wire
1913{
@@ -53,7 +47,6 @@ public function __construct($filename = '')
5347
5448 /**
5549 * Register the template engine when installing
56- *
5750 */
5851 public function install ()
5952 {
@@ -63,20 +56,20 @@ public function install()
6356
6457 /**
6558 * Unregister template engine when uninstalling
66- *
6759 */
6860 public function uninstall ()
6961 {
7062 $ this ->factory ->unregisterEngine ($ this );
7163 }
7264
7365
74- public function init () {}
66+ public function init ()
67+ {
68+ }
7569
7670
7771 /**
7872 * Init engine, derived classes must use this method to setup the engine
79- *
8073 */
8174 abstract public function initEngine ();
8275
@@ -126,7 +119,9 @@ public static function getDefaultConfig()
126119 * In our context, the config is loaded and available already in the constructor so just leave empty
127120 *
128121 */
129- public function setConfigData (array $ data = array ()) {}
122+ public function setConfigData (array $ data = array ())
123+ {
124+ }
130125
131126
132127 /**
@@ -222,7 +217,8 @@ public function setFilename($filename)
222217 public function getTemplatesPath ()
223218 {
224219 $ path = ltrim ($ this ->getConfig ('templates_path ' ), '/ ' );
225- return $ this ->config ->paths ->root . 'site/ ' . rtrim ($ path , '/ ' ) . '/ ' ;
220+
221+ return $ this ->wire ('config ' )->paths ->site . rtrim ($ path , '/ ' ) . '/ ' ;
226222 }
227223
228224
0 commit comments