Class: base_phrases
Quellcode Position: Program_Root/sys_phrases.php
Class base_phrases
Class Overview
|
Manage phrase class Provides functionality for translation Implementiert in Program_Root/sys_phrases.php [Zeile 25] base_object | --base_db | --base_phrasesAuthor(s):
|
[ Seitenanfang ]
Inherited Properties And Methods
| Inherited Properties | Inherited Methods |
|---|---|
|
Abgeleitet von base_db |
Abgeleitet von base_db
Abgeleitet von base_object
|
[ Seitenanfang ]
Properties Summary
| string | $dburi | Database URI |
| string | $default_module | Default module |
| string | $lng | Current language |
| array | $modules | Modules |
| string | $table_lng | Language - table |
| string | $table_log | Log messages - table |
| string | $table_modrel | Relations between phrases - moduels |
| string | $table_module | Module phrases |
| string | $table_phrase | Phrase table |
| string | $table_translation | Translation table |
[ Seitenanfang ]
Method Summary
| mixed | addModule() | Write a new Module in the language database |
| mixed | addPhraseLogMsg() | Writes a message in the logger |
| mixed | addRelation() | Create new connection between tables |
| mixed | getLngId() | Get language id from database |
| mixed | getModuleId() | Return ModulID |
| mixed | getPhraseId() | Return PhraseID |
| string | getText() | Get translation via function getTranslation() |
| string | getTextFmt() | Translate a string with format attributes |
| mixed | getTranslation() | Return translated phrase |
| mixed | loadModule() | Load translation for module |
| mixed | loadTranslation() | Load translation |
[ Seitenanfang ]
Properties
string
$dburi
= PAPAYA_DB_URI [Zeile 30]
Database URI
Neudefinition von:
- base_db::$dburi
- Database URI
[ Seitenanfang ]
string
$table_modrel
= PAPAYA_DB_TBL_PHRASE_MODULE_REL [Zeile 54]
Relations between phrases - moduels
[ Seitenanfang ]
string
$table_translation
= PAPAYA_DB_TBL_PHRASE_TRANS [Zeile 42]
Translation table
[ Seitenanfang ]
Methods
addModule [Zeile 202]
|
Write a new Module in the language database
Parameters:| mixed | $module: | Modul |
API Tags:
| Return: | record number or false |
[ Seitenanfang ]
addPhraseLogMsg [Zeile 246]
|
Writes a message in the logger
If debugging is enabled translation will be logged
Parameters:| string | $phrase: | Phrase |
| integer | $phrase_id: | Phrase |
| mixed | $module: | Modul |
API Tags:
| Return: | True without log function, otherwise return $this->insertRecord |
[ Seitenanfang ]
addRelation [Zeile 217]
|
Create new connection between tables
Parameters:| mixed | $module: | Modul |
| integer | $phrase_id: | Phrase ID |
API Tags:
| Return: | record number or false |
[ Seitenanfang ]
getLngId [Zeile 183]
|
Get language id from database
Parameters:| integer | $lng: | language (de_DE, en_US, ...) |
API Tags:
| Return: | ID or false |
[ Seitenanfang ]
getModuleId [Zeile 159]
|
Return ModulID
Parameters:| mixed | $module: | Modul |
API Tags:
| Return: | ModuleID oder false |
[ Seitenanfang ]
getPhraseId [Zeile 141]
|
Return PhraseID
Parameters:| string | $phrase: | Phrase |
API Tags:
| Return: | PhraseID or false |
[ Seitenanfang ]
getText [Zeile 316]
|
Get translation via function getTranslation()
Parameters:| string | $phrase: | Phrase |
| mixed | $module: | Modul |
API Tags:
| Return: | if translation is aviable translation will be returned . otherwise phrase will be returned |
[ Seitenanfang ]
getTextFmt [Zeile 332]
|
Translate a string with format attributes
Parameters:| string | $phrase: | Phrase |
| mixed | $module: | Modul |
| array | $vals: | parameter |
[ Seitenanfang ]
getTranslation [Zeile 266]
|
Return translated phrase
Parameters:| string | $phrase: | Phrase |
| mixed | $module: | Modul |
API Tags:
| Return: | translation or false |
[ Seitenanfang ]
loadModule [Zeile 92]
|
Load translation for module
Parameters:| string | $title: | title module |
| mixed | $module: | module |
API Tags:
| Return: | flase for no translation otherwise translation will be returned |
[ Seitenanfang ]
loadTranslation [Zeile 120]
|
Load translation
Parameters:| string | $phrase: | Phrase |
[ Seitenanfang ]
