PHP Класс Translation

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$m_columnNames
$m_dbTableName
$m_keyColumnNames
$m_keyIsAutoIncrement

Открытые методы

Метод Описание
GetPhrase ( integer $p_languageId, integer $p_phraseId ) A convenience function to just grab a translation.
GetTranslations ( integer $p_phraseId, array $p_sqlOptions = null ) : array Return an array of phrases indexed by language ID.
SetPhrase ( integer $p_languageId, integer $p_phraseId, string $p_text ) Enter description here.
Translation ( $p_languageId = null, $p_phraseId = null )
create ( string $p_text = null ) : boolean Create a translation of a phrase. If the phrase ID is set in the constructor, we assume that the phrase already exists and we are just creating a translation, and not a new phrase.
deletePhrase ( $p_phraseId = null ) Delete the phrase and all of its translations.
getLanguageId ( ) : integer Get the language ID.
getPhraseId ( ) : integer Get the phrase ID.
getText ( ) : string Get the text.
setText ( string $p_value ) : boolean Set the translation text.

Приватные методы

Метод Описание
__GeneratePhraseId ( ) Create a unique identifier for a phrase.

Описание методов

GetPhrase() публичный статический Метод

A convenience function to just grab a translation.
public static GetPhrase ( integer $p_languageId, integer $p_phraseId )
$p_languageId integer
$p_phraseId integer

GetTranslations() публичный статический Метод

Return an array of phrases indexed by language ID.
public static GetTranslations ( integer $p_phraseId, array $p_sqlOptions = null ) : array
$p_phraseId integer
$p_sqlOptions array
Результат array

SetPhrase() публичный статический Метод

..
public static SetPhrase ( integer $p_languageId, integer $p_phraseId, string $p_text )
$p_languageId integer
$p_phraseId integer
$p_text string

Translation() публичный Метод

public Translation ( $p_languageId = null, $p_phraseId = null )

create() публичный Метод

Create a translation of a phrase. If the phrase ID is set in the constructor, we assume that the phrase already exists and we are just creating a translation, and not a new phrase.
public create ( string $p_text = null ) : boolean
$p_text string Optional. The translation text.
Результат boolean

deletePhrase() публичный Метод

This can be called statically or as a member function. If called statically, you must give it an argument.
public deletePhrase ( $p_phraseId = null )

getLanguageId() публичный Метод

Get the language ID.
public getLanguageId ( ) : integer
Результат integer

getPhraseId() публичный Метод

Get the phrase ID.
public getPhraseId ( ) : integer
Результат integer

getText() публичный Метод

Get the text.
public getText ( ) : string
Результат string

setText() публичный Метод

Set the translation text.
public setText ( string $p_value ) : boolean
$p_value string
Результат boolean

Описание свойств

$m_columnNames публичное свойство

public $m_columnNames

$m_dbTableName публичное свойство

public $m_dbTableName

$m_keyColumnNames публичное свойство

public $m_keyColumnNames

$m_keyIsAutoIncrement публичное свойство

public $m_keyIsAutoIncrement