PHP 클래스 Translation

파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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