Stud.IP  4.0 Revision
I18NString Class Reference
Collaboration diagram for I18NString:
Collaboration graph

Public Member Functions

 __construct ($base, $lang=null, $metadata=array())
 
 __toString ()
 
 setOriginal ($text)
 
 setTranslations ($lang)
 
 setMetadata ($metadata)
 
 original ()
 
 translation ($lang)
 
 toArray ()
 
 trim ($symbols=" \t\n\r\0\x0B")
 
 storeTranslations ()
 
 removeTranslations ()
 

Static Public Member Functions

static load ($object_id, $table, $field, $base=null)
 
static fetchDataForField ($object_id, $table, $field)
 
static fetchDataForRow ($object_id, $table)
 

Detailed Description

I18NString class

Constructor & Destructor Documentation

◆ __construct()

__construct (   $base,
  $lang = null,
  $metadata = array() 
)

Initialize a new I18NString instance.

Parameters
string$basetext in default content language
array$langtext in additional languages
array$metadatadatabase info for id, table, field

Member Function Documentation

◆ __toString()

__toString ( )

Return the text representation of this object.

Here is the call graph for this function:

◆ fetchDataForField()

static fetchDataForField (   $object_id,
  $table,
  $field 
)
static
Parameters
$object_id
$table
$field
Returns
array
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetchDataForRow()

static fetchDataForRow (   $object_id,
  $table 
)
static
Parameters
$object_id
$table
Returns
array
Here is the call graph for this function:

◆ load()

static load (   $object_id,
  $table,
  $field,
  $base = null 
)
static
Parameters
$object_id
$table
$field
null$base
Returns
I18NString
Here is the call graph for this function:

◆ original()

original ( )

Return the string in the default content language.

Returns
string

◆ removeTranslations()

removeTranslations ( )
Here is the call graph for this function:

◆ setMetadata()

setMetadata (   $metadata)
Parameters
array$metadata

◆ setOriginal()

setOriginal (   $text)
Parameters
string$text
Returns
string

◆ setTranslations()

setTranslations (   $lang)
Parameters
array$lang
Returns
array

◆ storeTranslations()

storeTranslations ( )

Stores the i18n String manually in the database

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toArray()

toArray ( )

Return an array containg the text in all additional languages.

Returns
array
Here is the call graph for this function:
Here is the caller graph for this function:

◆ translation()

translation (   $lang)

Return the string in the specified additional language.

Parameters
string
Returns
string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ trim()

trim (   $symbols = " \t\n\r\0\x0B")

Trim all language strings

Parameters
string$symbolsAll symbols to trim.
Returns
I18NString
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: