Skip to content

Commit

Permalink
cachePath argument will be required in BladeCompiler #115
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Aug 1, 2016
1 parent 0db171e commit cd3be64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Extractors/Blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
*/
class Blade extends Extractor implements ExtractorInterface
{
public static $cachePath;

/**
* {@inheritdoc}
*/
public static function fromString($string, Translations $translations = null, $file = '')
{
$bladeCompiler = new BladeCompiler(new Filesystem(), null);
$cachePath = empty(static::$cachePath) ? sys_get_temp_dir() : static::$cachePath;
$bladeCompiler = new BladeCompiler(new Filesystem(), $cachePath);
$string = $bladeCompiler->compileString($string);

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

0 comments on commit cd3be64

Please sign in to comment.