ILIAS
release_8 Revision v8.19
|
Class ilLanguageFile. More...
Public Member Functions | |
__construct (string $a_file, string $a_key="", string $a_scope="global") | |
Constructor $a_file language file path and name $a_key (optional) language key $a_scope (optional) scope ('global', 'local' or 'unchanged') More... | |
read () | |
Read a language file Return true, if reading successful. More... | |
write (string $a_header="") | |
Write a language file. More... | |
build (string $a_header='') | |
Build and get the file content. More... | |
getErrorMessage () | |
Get the error message of the last read/write operation. More... | |
getHeader () | |
Get the header of the original file. More... | |
getAllParams () | |
Get array of all parameters Return array [name => value]. More... | |
getAllValues () | |
Get array of all values Return array [module.separator.identifier => value]. More... | |
getAllComments () | |
Get array of all comments Return array [module.separator.identifier => comment]. More... | |
getParam (string $a_name) | |
Get a single parameter $a_name parameter name. More... | |
getValue (string $a_module, string $a_identifier) | |
Get a single value $a_module module name $a_identifier indentifier. More... | |
getComment (string $a_module, string $a_identifier) | |
Get a single comment $a_module module name $a_identifier indentifier. More... | |
setParam (string $a_name, string $a_value) | |
Set a parameter $a_name parameter name $a_value parameter value. More... | |
setValue (string $a_module, string $a_identifier, string $a_value) | |
Set a single value $a_module module name $a_identifier indentifier $a_value value. More... | |
setAllValues (array $a_values) | |
Set all values $a_values [module.separator.identifier => value]. More... | |
setAllComments (array $a_comments) | |
Set all comments $a_comments [module.separator.identifier => comment]. More... | |
setComment (string $a_module, string $a_identifier, string $a_comment) | |
Set a single comment $a_module module name $a_identifier indentifier $a_comment comment. More... | |
Static Public Member Functions | |
static | _getGlobalLanguageFile (string $a_lang_key) |
Read and get a global language file as a singleton object $a_lang_key language key. More... | |
Private Attributes | |
string | $lang_file |
string | $lang_key |
string | $scope |
string | $header |
string | $file_start = "<!-- language file start -->" |
string | $separator |
string | $comment_separator |
array | $params |
array | $values |
array | $comments |
string | $error_message = "" |
Static Private Attributes | |
static array | $global_file_objects |
Class ilLanguageFile.
Provides methods for working with language files: read, check and write content, comments and parameters
Definition at line 32 of file class.ilLanguageFile.php.
ilLanguageFile::__construct | ( | string | $a_file, |
string | $a_key = "" , |
||
string | $a_scope = "global" |
||
) |
Constructor $a_file language file path and name $a_key (optional) language key $a_scope (optional) scope ('global', 'local' or 'unchanged')
Definition at line 53 of file class.ilLanguageFile.php.
References $DIC, $file_start, $lng, and ILIAS_VERSION.
|
static |
Read and get a global language file as a singleton object $a_lang_key language key.
Definition at line 378 of file class.ilLanguageFile.php.
Referenced by ilObjLanguageExt\_saveValues(), and ilObjLanguageExt\getGlobalLanguageFile().
ilLanguageFile::build | ( | string | $a_header = '' | ) |
Build and get the file content.
$a_header (optional) fixed header for the new file
Definition at line 191 of file class.ilLanguageFile.php.
References $DIC, $ilUser, ILIAS\LTI\ToolProvider\$key, $lng, $name, $tpl, and getAllParams().
Referenced by write().
ilLanguageFile::getAllComments | ( | ) |
Get array of all comments Return array [module.separator.identifier => comment].
Definition at line 288 of file class.ilLanguageFile.php.
References $comments.
ilLanguageFile::getAllParams | ( | ) |
Get array of all parameters Return array [name => value].
Definition at line 270 of file class.ilLanguageFile.php.
References $params.
Referenced by build().
ilLanguageFile::getAllValues | ( | ) |
Get array of all values Return array [module.separator.identifier => value].
Definition at line 279 of file class.ilLanguageFile.php.
References $values.
ilLanguageFile::getComment | ( | string | $a_module, |
string | $a_identifier | ||
) |
Get a single comment $a_module module name $a_identifier indentifier.
Definition at line 317 of file class.ilLanguageFile.php.
ilLanguageFile::getErrorMessage | ( | ) |
Get the error message of the last read/write operation.
Definition at line 251 of file class.ilLanguageFile.php.
References $error_message.
ilLanguageFile::getHeader | ( | ) |
Get the header of the original file.
Definition at line 260 of file class.ilLanguageFile.php.
References $header.
ilLanguageFile::getParam | ( | string | $a_name | ) |
Get a single parameter $a_name parameter name.
Definition at line 297 of file class.ilLanguageFile.php.
ilLanguageFile::getValue | ( | string | $a_module, |
string | $a_identifier | ||
) |
Get a single value $a_module module name $a_identifier indentifier.
Definition at line 307 of file class.ilLanguageFile.php.
ilLanguageFile::read | ( | ) |
Read a language file Return true, if reading successful.
Otherwise return false
Definition at line 91 of file class.ilLanguageFile.php.
References $DIC, ILIAS\LTI\ToolProvider\$key, $lng, and $param.
ilLanguageFile::setAllComments | ( | array | $a_comments | ) |
Set all comments $a_comments [module.separator.identifier => comment].
Definition at line 356 of file class.ilLanguageFile.php.
ilLanguageFile::setAllValues | ( | array | $a_values | ) |
Set all values $a_values [module.separator.identifier => value].
Definition at line 347 of file class.ilLanguageFile.php.
ilLanguageFile::setComment | ( | string | $a_module, |
string | $a_identifier, | ||
string | $a_comment | ||
) |
Set a single comment $a_module module name $a_identifier indentifier $a_comment comment.
Definition at line 368 of file class.ilLanguageFile.php.
ilLanguageFile::setParam | ( | string | $a_name, |
string | $a_value | ||
) |
Set a parameter $a_name parameter name $a_value parameter value.
Definition at line 327 of file class.ilLanguageFile.php.
ilLanguageFile::setValue | ( | string | $a_module, |
string | $a_identifier, | ||
string | $a_value | ||
) |
Set a single value $a_module module name $a_identifier indentifier $a_value value.
Definition at line 338 of file class.ilLanguageFile.php.
ilLanguageFile::write | ( | string | $a_header = "" | ) |
Write a language file.
$a_header (optional) fixed header for the new file
Definition at line 179 of file class.ilLanguageFile.php.
References build().
|
private |
Definition at line 41 of file class.ilLanguageFile.php.
|
private |
Definition at line 44 of file class.ilLanguageFile.php.
Referenced by getAllComments().
|
private |
Definition at line 45 of file class.ilLanguageFile.php.
Referenced by getErrorMessage().
|
private |
Definition at line 39 of file class.ilLanguageFile.php.
Referenced by __construct().
|
staticprivate |
Definition at line 34 of file class.ilLanguageFile.php.
|
private |
Definition at line 38 of file class.ilLanguageFile.php.
Referenced by getHeader().
|
private |
Definition at line 35 of file class.ilLanguageFile.php.
|
private |
Definition at line 36 of file class.ilLanguageFile.php.
|
private |
Definition at line 42 of file class.ilLanguageFile.php.
Referenced by getAllParams().
|
private |
Definition at line 37 of file class.ilLanguageFile.php.
|
private |
Definition at line 40 of file class.ilLanguageFile.php.
|
private |
Definition at line 43 of file class.ilLanguageFile.php.
Referenced by getAllValues().