|
@@ -32,7 +32,7 @@ discard block |
|
|
block discarded – undo |
|
32
|
32
|
public function __construct($phantomHost, $templateCache = null) { |
|
33
|
33
|
$this->phantomHost = $phantomHost; |
|
34
|
34
|
$this->browser = new Browser($phantomHost); |
|
35
|
|
- $this->templateLoader = new \Twig_Loader_Filesystem(realpath(__DIR__ . '/Resources/Script')); |
|
|
35
|
+ $this->templateLoader = new \Twig_Loader_Filesystem(realpath(__DIR__.'/Resources/Script')); |
|
36
|
36
|
$this->templateEnv = new \Twig_Environment($this->templateLoader, array('cache' => $this->templateCacheSetup($templateCache), 'strict_variables' => true)); |
|
37
|
37
|
} |
|
38
|
38
|
|
|
@@ -45,7 +45,7 @@ discard block |
|
|
block discarded – undo |
|
45
|
45
|
protected function templateCacheSetup($templateCache) { |
|
46
|
46
|
$cacheDir = $templateCache; |
|
47
|
47
|
if ($templateCache === null) { |
|
48
|
|
- $cacheDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "jcalderonzumba" . DIRECTORY_SEPARATOR . "phantomjs"; |
|
|
48
|
+ $cacheDir = sys_get_temp_dir().DIRECTORY_SEPARATOR."jcalderonzumba".DIRECTORY_SEPARATOR."phantomjs"; |
|
49
|
49
|
if (!file_exists($cacheDir)) { |
|
50
|
50
|
mkdir($cacheDir, 0777, true); |
|
51
|
51
|
} |
Please login to merge, or discard this patch.