1212
1313namespace PatternLab \PatternEngine \Twig ;
1414
15- use \PatternLab \Config ;
16- use \PatternLab \PatternEngine \Twig \PatternLoader ;
1715use \PatternLab \PatternEngine \Rule ;
1816
1917class PatternEngineRule extends Rule {
@@ -23,48 +21,8 @@ public function __construct() {
2321 parent ::__construct ();
2422
2523 $ this ->engineProp = "twig " ;
24+ $ this ->basePath = "\PatternLab\PatternEngine\Twig " ;
2625
2726 }
2827
29- /**
30- * Load a new Twig instance that uses the Pattern Loader
31- *
32- * @return {Object} an instance of the Twig engine
33- */
34- public function getPatternLoader ($ options = array ()) {
35-
36- //default var
37- $ patternSourceDir = Config::getOption ("patternSourceDir " );
38-
39- $ twigLoader = new PatternLoader ($ patternSourceDir ,array ("patternPaths " => $ options ["patternPaths " ]));
40-
41- return new \Twig_Environment ($ twigLoader );
42-
43- }
44-
45- /**
46- * Load a new Twig instance that uses the File System Loader
47- *
48- * @return {Object} an instance of the Twig engine
49- */
50- public function getFileSystemLoader ($ options = array ()) {
51-
52- $ twigLoader = new Twig_Loader_Filesystem (array ($ options ["templatePath " ],$ options ["partialsPath " ]));
53-
54- return new \Twig_Environment ($ twigLoader );
55-
56- }
57-
58- /**
59- * Load a new Twig instance that is just a vanilla Twig string rendering engine
60- *
61- * @return {Object} an instance of the Twig engine
62- */
63- public function getVanillaLoader ($ options = array ()) {
64-
65- $ twigLoader = new \Twig_Loader_String ();
66-
67- return new \Twig_Environment ($ twigLoader );
68-
69- }
7028}
0 commit comments