Class: base_phrases

Quellcode Position: Program_Root/sys_phrases.php

Class base_phrases

Class Overview
Inherited Properties And Methods
Inherited Properties Inherited Methods

Abgeleitet von base_db

base_db::$dbobj_name
base_db::$dbsocket
base_db::$db_obj
base_db::$msgs

Abgeleitet von base_db

base_db::createDBObject()
Create data base object(PEAR)
base_db::db_addField()
Interface function: insert field
base_db::db_addIndex()
Interface function: insert index
base_db::db_changeField()
Interface function: change field
base_db::db_changeIndex()
Interface function: change index
base_db::db_connect()
Connect to data base object
base_db::db_createTable()
Interface function: create given table
base_db::db_deleteRecord()
Interface function: delete database record
base_db::db_deleteRecords()
Interface function: delete records
base_db::db_dropField()
Interface function: delete field
base_db::db_dropIndex()
Interface function: delete index
base_db::db_emptyTable()
Interface function: delete ALL data in this table
base_db::db_getSQLSource()
DBMS spezific SQL source
base_db::db_insertRecord()
Interface function: create new record, return ID, set default values
base_db::db_insertRecords()
Interface function: insert records
base_db::db_query()
Interface function: submit database query
base_db::db_queryFmt()
Interface function: escape params and submit query
base_db::db_queryTableNames()
Interface function: delete all table names
base_db::db_queryTableStructure()
Interface function: table structur returned as array
base_db::db_updateRecord()
Interface function: change data record
base_db::db_updateRecords()
Interface function: change data records
base_db::escapeStr()
Store string in sql for use

Abgeleitet von base_object

base_object::addmsg()
Adds a message in the message object.
base_object::createPluginObject()
Create plugin object
base_object::debug()
Show the debug of the variable &$var
base_object::encodeQueryString()
Encode query string
base_object::escapeForFilename()
Escape chars in a string to use it in a filename
base_object::getAbsoluteURL()
Return absolute URL
base_object::getBaseLink()
Get base link
base_object::getBasePath()
get base path to current script
base_object::getLink()
Get link
base_object::getSessionValue()
base_object::getWebLink()
Get web link
base_object::getWebMediaLink()
Get web media link
base_object::includePluginFile()
Include plugin file
base_object::initializeParams()
Parameter initialisation
base_object::initializeSessionParam()
Initialisation of session-parameter
base_object::logMsg()
Log events
base_object::parseRequestURI()
Parse request URI to filter data out of it
base_object::setSessionValue()
base_object::stripslashes()
base_object::_gt()
Phrasetranslator - Fetch translation for all phrase
base_object::_gtf()
Phrasetranslator - Fetch translation of one phrase and insert variable
base_object::_gtfile()
Phrases - Locate files

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

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

Properties
string   $dburi = PAPAYA_DB_URI [Zeile 30]

Database URI

Neudefinition von:
base_db::$dburi
Database URI

string   $default_module = NULL [Zeile 83]

Default module


string   $lng = null [Zeile 71]

Current language


array   $modules = null [Zeile 77]

Modules


string   $table_lng = PAPAYA_DB_TBL_LNG [Zeile 65]

Language - table


string   $table_log = PAPAYA_DB_TBL_PHRASE_LOG [Zeile 60]

Log messages - table


string   $table_modrel = PAPAYA_DB_TBL_PHRASE_MODULE_REL [Zeile 54]

Relations between phrases - moduels


string   $table_module = PAPAYA_DB_TBL_PHRASE_MODULE [Zeile 48]

Module phrases


string   $table_phrase = PAPAYA_DB_TBL_PHRASE [Zeile 36]

Phrase table


string   $table_translation = PAPAYA_DB_TBL_PHRASE_TRANS [Zeile 42]

Translation table


Methods
addModule  [Zeile 202]

  mixed addModule( mixed $module  )

Write a new Module in the language database

Parameters:
mixed   $module:  Modul

API Tags:
Return:  record number or false


addPhraseLogMsg  [Zeile 246]

  mixed addPhraseLogMsg( mixed $msg, [string $phrase = NULL], [integer $phrase_id = NULL], [mixed $module = NULL]  )

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


addRelation  [Zeile 217]

  mixed addRelation( mixed $module, integer $phrase_id  )

Create new connection between tables

Parameters:
mixed   $module:  Modul
integer   $phrase_id:  Phrase ID

API Tags:
Return:  record number or false


getLngId  [Zeile 183]

  mixed getLngId( integer $lng  )

Get language id from database

Parameters:
integer   $lng:  language (de_DE, en_US, ...)

API Tags:
Return:  ID or false


getModuleId  [Zeile 159]

  mixed getModuleId( mixed $module  )

Return ModulID

Parameters:
mixed   $module:  Modul

API Tags:
Return:  ModuleID oder false


getPhraseId  [Zeile 141]

  mixed getPhraseId( string $phrase  )

Return PhraseID

Parameters:
string   $phrase:  Phrase

API Tags:
Return:  PhraseID or false


getText  [Zeile 316]

  string getText( string $phrase, [mixed $module = NULL]  )

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


getTextFmt  [Zeile 332]

  string getTextFmt( string $phrase, array $vals, [mixed $module = NULL]  )

Translate a string with format attributes

Parameters:
string   $phrase:  Phrase
mixed   $module:  Modul
array   $vals:  parameter


getTranslation  [Zeile 266]

  mixed getTranslation( string $phrase, mixed $module  )

Return translated phrase

Parameters:
string   $phrase:  Phrase
mixed   $module:  Modul

API Tags:
Return:  translation or false


loadModule  [Zeile 92]

  mixed loadModule( string $title, mixed $module  )

Load translation for module

Parameters:
string   $title:  title module
mixed   $module:  module

API Tags:
Return:  flase for no translation otherwise translation will be returned


loadTranslation  [Zeile 120]

  mixed loadTranslation( string $phrase  )

Load translation

Parameters:
string   $phrase:  Phrase