Skip to content

Commit cd3be64

Browse files
committed
cachePath argument will be required in BladeCompiler php-gettext#115
1 parent 0db171e commit cd3be64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Extractors/Blade.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
*/
1212
class Blade extends Extractor implements ExtractorInterface
1313
{
14+
public static $cachePath;
15+
1416
/**
1517
* {@inheritdoc}
1618
*/
1719
public static function fromString($string, Translations $translations = null, $file = '')
1820
{
19-
$bladeCompiler = new BladeCompiler(new Filesystem(), null);
21+
$cachePath = empty(static::$cachePath) ? sys_get_temp_dir() : static::$cachePath;
22+
$bladeCompiler = new BladeCompiler(new Filesystem(), $cachePath);
2023
$string = $bladeCompiler->compileString($string);
2124

2225
return PhpCode::fromString($string, $translations, $file);

0 commit comments

Comments
 (0)