ILIAS
Release_5_0_x_branch Revision 61816
|
Class ilLanguageFile. More...
Public Member Functions | |
__construct ($a_file, $a_key="", $a_scope= 'global') | |
Constructor. | |
read () | |
Read a language file. | |
write ($a_header= '') | |
Write a language file. | |
build ($a_header= '') | |
Build and get the file content. | |
getErrorMessage () | |
Get the error message of the last read/write operation. | |
getHeader () | |
Get the header of the original file. | |
getAllParams () | |
Get array of all parameters. | |
getAllValues () | |
Get array of all values. | |
getAllComments () | |
Get array of all comments. | |
getParam ($a_name) | |
Get a single parameter. | |
getValue ($a_module, $a_identifier) | |
Get a single value. | |
getComment ($a_module, $a_identifier) | |
Get a single comment. | |
setParam ($a_name, $a_value) | |
Set a parameter. | |
setValue ($a_module, $a_identifier, $a_value) | |
Set a single value. | |
setAllValues ($a_values) | |
Set all values. | |
setAllComments ($a_comments) | |
Set all comments. | |
setComment ($a_module, $a_identifier, $a_value) | |
Set a single comment. |
Static Public Member Functions | |
static | _getGlobalLanguageFile ($a_lang_key) |
Read and get a global language file as a singleton object. |
Private Attributes | |
$lang_file | |
$lang_key | |
$scope | |
$header | |
$file_start = "<!-- language file start -->" | |
$separator | |
$comment_separator | |
$params = array() | |
$values = array() | |
$comments = array() | |
$error_message = "" |
Static Private Attributes | |
static | $global_file_objects = array() |
Created global file objects. |
Class ilLanguageFile.
Provides methods for working with language files: read, check and write content, comments and parameters
Definition at line 35 of file class.ilLanguageFile.php.
ilLanguageFile::__construct | ( | $a_file, | |
$a_key = "" , |
|||
$a_scope = 'global' |
|||
) |
Constructor.
string | language file path and name |
string | (optional) language key |
string | (optional) scope ('global', 'local' or 'unchanged') |
Definition at line 117 of file class.ilLanguageFile.php.
References $file_start, $lng, and ILIAS_VERSION.
|
static |
Read and get a global language file as a singleton object.
string | language key |
Definition at line 477 of file class.ilLanguageFile.php.
References $lng.
Referenced by ilObjLanguageExt\_saveValues(), and ilObjLanguageExt\getGlobalLanguageFile().
ilLanguageFile::build | ( | $a_header = '' | ) |
Build and get the file content.
string | (optional) fixed header for the new file |
Definition at line 280 of file class.ilLanguageFile.php.
References $ilUser, $lng, $tpl, and getAllParams().
Referenced by write().
ilLanguageFile::getAllComments | ( | ) |
Get array of all comments.
Definition at line 384 of file class.ilLanguageFile.php.
References $comments.
ilLanguageFile::getAllParams | ( | ) |
Get array of all parameters.
Definition at line 366 of file class.ilLanguageFile.php.
References $params.
Referenced by build().
ilLanguageFile::getAllValues | ( | ) |
Get array of all values.
Definition at line 375 of file class.ilLanguageFile.php.
References $values.
ilLanguageFile::getComment | ( | $a_module, | |
$a_identifier | |||
) |
Get a single comment.
string | module name |
string | indentifier |
Definition at line 416 of file class.ilLanguageFile.php.
ilLanguageFile::getErrorMessage | ( | ) |
Get the error message of the last read/write operation.
Definition at line 346 of file class.ilLanguageFile.php.
References $error_message.
ilLanguageFile::getHeader | ( | ) |
Get the header of the original file.
Definition at line 356 of file class.ilLanguageFile.php.
References $header.
ilLanguageFile::getParam | ( | $a_name | ) |
Get a single parameter.
string | parameter name |
Definition at line 394 of file class.ilLanguageFile.php.
ilLanguageFile::getValue | ( | $a_module, | |
$a_identifier | |||
) |
Get a single value.
string | module name |
string | indentifier |
Definition at line 405 of file class.ilLanguageFile.php.
ilLanguageFile::read | ( | ) |
Read a language file.
Definition at line 156 of file class.ilLanguageFile.php.
References $lng.
ilLanguageFile::setAllComments | ( | $a_comments | ) |
Set all comments.
array | module.separator.identifier => comment |
Definition at line 455 of file class.ilLanguageFile.php.
ilLanguageFile::setAllValues | ( | $a_values | ) |
Set all values.
array | module.separator.identifier => value |
Definition at line 446 of file class.ilLanguageFile.php.
ilLanguageFile::setComment | ( | $a_module, | |
$a_identifier, | |||
$a_value | |||
) |
Set a single comment.
string | module name |
string | indentifier |
string | comment |
Definition at line 467 of file class.ilLanguageFile.php.
ilLanguageFile::setParam | ( | $a_name, | |
$a_value | |||
) |
Set a parameter.
string | parameter name |
string | parameter value |
Definition at line 426 of file class.ilLanguageFile.php.
ilLanguageFile::setValue | ( | $a_module, | |
$a_identifier, | |||
$a_value | |||
) |
Set a single value.
string | module name |
string | indentifier |
string | value |
Definition at line 437 of file class.ilLanguageFile.php.
ilLanguageFile::write | ( | $a_header = '' | ) |
Write a language file.
string | (optional) fixed header for the new file |
Definition at line 267 of file class.ilLanguageFile.php.
References build().
|
private |
Definition at line 85 of file class.ilLanguageFile.php.
|
private |
Definition at line 103 of file class.ilLanguageFile.php.
Referenced by getAllComments().
|
private |
Definition at line 109 of file class.ilLanguageFile.php.
Referenced by getErrorMessage().
|
private |
Definition at line 72 of file class.ilLanguageFile.php.
Referenced by __construct().
|
staticprivate |
|
private |
Definition at line 66 of file class.ilLanguageFile.php.
Referenced by getHeader().
|
private |
Definition at line 47 of file class.ilLanguageFile.php.
|
private |
Definition at line 53 of file class.ilLanguageFile.php.
|
private |
Definition at line 91 of file class.ilLanguageFile.php.
Referenced by getAllParams().
|
private |
Definition at line 59 of file class.ilLanguageFile.php.
|
private |
Definition at line 79 of file class.ilLanguageFile.php.
|
private |
Definition at line 97 of file class.ilLanguageFile.php.
Referenced by getAllValues().