ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Gettext\Extractors\Blade Class Reference

Class to get gettext strings from blade.php files returning arrays. More...

+ Inheritance diagram for Gettext\Extractors\Blade:
+ Collaboration diagram for Gettext\Extractors\Blade:

Static Public Member Functions

static fromString ($string, Translations $translations=null, $file='')
 {Parses a string and append the translations found in the Translations instance.
Parameters
string$string
Translations | null$translations
string$fileThe file path to insert the reference
Returns
Translations
} More...
 
- Static Public Member Functions inherited from Gettext\Extractors\Extractor
static fromFile ($file, Translations $translations=null)
 Extract the translations from a file. More...
 
- Static Public Member Functions inherited from Gettext\Extractors\ExtractorInterface
static fromFile ($file, Translations $translations=null)
 Extract the translations from a file. More...
 

Static Public Attributes

static $cachePath
 

Additional Inherited Members

- Static Protected Member Functions inherited from Gettext\Extractors\Extractor
static getFiles ($file)
 Checks and returns all files. More...
 
static readFile ($file)
 Reads and returns the content of a file. More...
 

Detailed Description

Class to get gettext strings from blade.php files returning arrays.

Definition at line 12 of file Blade.php.

Member Function Documentation

◆ fromString()

static Gettext\Extractors\Blade::fromString (   $string,
Translations  $translations = null,
  $file = '' 
)
static

{Parses a string and append the translations found in the Translations instance.

Parameters
string$string
Translations | null$translations
string$fileThe file path to insert the reference
Returns
Translations
}

Implements Gettext\Extractors\ExtractorInterface.

Definition at line 19 of file Blade.php.

References Gettext\Extractors\Blade\$cachePath, $file, and Gettext\Extractors\PhpCode\fromString().

20  {
21  $cachePath = empty(static::$cachePath) ? sys_get_temp_dir() : static::$cachePath;
22  $bladeCompiler = new BladeCompiler(new Filesystem(), $cachePath);
23  $string = $bladeCompiler->compileString($string);
24 
25  return PhpCode::fromString($string, $translations, $file);
26  }
static fromString($string, Translations $translations=null, $file='')
{Parses a string and append the translations found in the Translations instance.The file path to inse...
Definition: PhpCode.php:50
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
Class FlySystemFileAccessTest.
+ Here is the call graph for this function:

Field Documentation

◆ $cachePath

Gettext\Extractors\Blade::$cachePath
static

Definition at line 14 of file Blade.php.

Referenced by Gettext\Extractors\Blade\fromString().


The documentation for this class was generated from the following file: