ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
JsCode.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Gettext\Extractors
;
4
5
use
Gettext\Translations
;
6
use
Gettext\Utils\JsFunctionsScanner
;
7
11
class
JsCode
extends
Extractor
implements
ExtractorInterface
12
{
13
public
static
$functions
= array(
14
'__'
=>
'__'
,
15
'n__'
=>
'n__'
,
16
'p__'
=>
'p__'
,
17
);
18
22
public
static
function
fromString
($string,
Translations
$translations = null, $file =
''
)
23
{
24
if
($translations === null) {
25
$translations =
new
Translations
();
26
}
27
28
$functions
=
new
JsFunctionsScanner
($string);
29
$functions
->saveGettextFunctions(self::$functions, $translations, $file);
30
}
31
}
Gettext\Extractors\JsCode
Class to get gettext strings from javascript files.
Definition:
JsCode.php:11
Gettext\Extractors\JsCode\fromString
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:
JsCode.php:22
Gettext\Utils\JsFunctionsScanner
Definition:
JsFunctionsScanner.php:5
Translations
Gettext\Translations
Class to manage a collection of translations.
Definition:
Translations.php:11
Gettext\Extractors\Extractor
Definition:
Extractor.php:9
Gettext\Extractors\ExtractorInterface
Definition:
ExtractorInterface.php:7
php
Gettext\Extractors\JsCode\$functions
static $functions
Definition:
JsCode.php:13
Gettext\Extractors
Definition:
Blade.php:3
JsFunctionsScanner
libs
composer
vendor
gettext
gettext
src
Extractors
JsCode.php
Generated on Thu Jan 16 2025 19:01:40 for ILIAS by
1.8.13 (using
Doxyfile
)