@@ 45-48 (lines=4) @@ | ||
42 | if (!$twigEnvironment->getSetterProperty('setCache')->isValueSet()) { |
|
43 | $twigEnvironment->getSetterProperty('setCache')->setValue($twigCacheFileSystem); |
|
44 | } |
|
45 | if (!$moufTwigExtension->getConstructorArgumentProperty('container')->isValueSet()) { |
|
46 | $moufTwigExtension->getConstructorArgumentProperty('container')->setValue('return $container;'); |
|
47 | $moufTwigExtension->getConstructorArgumentProperty('container')->setOrigin("php"); |
|
48 | } |
|
49 | if (!$twigCacheFileSystem->getConstructorArgumentProperty('directory')->isValueSet()) { |
|
50 | $twigCacheFileSystem->getConstructorArgumentProperty('directory')->setValue('// If we are running on a Unix environment, let\'s prepend the cache with the user id of the PHP process. |
|
51 | // This way, we can avoid rights conflicts. |
|
@@ 49-59 (lines=11) @@ | ||
46 | $moufTwigExtension->getConstructorArgumentProperty('container')->setValue('return $container;'); |
|
47 | $moufTwigExtension->getConstructorArgumentProperty('container')->setOrigin("php"); |
|
48 | } |
|
49 | if (!$twigCacheFileSystem->getConstructorArgumentProperty('directory')->isValueSet()) { |
|
50 | $twigCacheFileSystem->getConstructorArgumentProperty('directory')->setValue('// If we are running on a Unix environment, let\'s prepend the cache with the user id of the PHP process. |
|
51 | // This way, we can avoid rights conflicts. |
|
52 | if (function_exists(\'posix_geteuid\')) { |
|
53 | $posixGetuid = posix_geteuid(); |
|
54 | } else { |
|
55 | $posixGetuid = \'\'; |
|
56 | } |
|
57 | return rtrim(sys_get_temp_dir(), \'/\\\\\').\'/mouftwigtemplatemain_\'.$posixGetuid.str_replace(":", "", ROOT_PATH);'); |
|
58 | $twigCacheFileSystem->getConstructorArgumentProperty('directory')->setOrigin("php"); |
|
59 | } |
|
60 | ||
61 | // Let's rewrite the MoufComponents.php file to save the component |
|
62 | $moufManager->rewriteMouf(); |