class vB5_Template_Phrase

Constants

PLACEHOLDER_PREFIX

PLACEHOLDER_SUFIX

Properties

static protected $instance
protected $cache
protected $pending
protected $stack

Methods

static 
instance()

No description

register($args)

No description

type
getPhrase()

The use of this function should be avoided when possible because it forces the controller to fetch all missing phrases immediately.

resetPending()

No description

replacePlaceholders($content)

No description

getPlaceholder($phraseName, $pos)

No description

fetchPhrases()

No description

string
constructPhraseFromArray(array $phrase_array)

Construct Phrase from Array

Details

at line 23
static instance()

at line 34
register($args)

Parameters

$args

at line 65
type getPhrase()

The use of this function should be avoided when possible because it forces the controller to fetch all missing phrases immediately.

Return Value

type

at line 82
resetPending()

at line 87
replacePlaceholders($content)

Parameters

$content

at line 174
protected getPlaceholder($phraseName, $pos)

Parameters

$phraseName
$pos

at line 179
protected fetchPhrases()

at line 205
protected string constructPhraseFromArray(array $phrase_array)

Construct Phrase from Array

this function is actually just a wrapper for sprintf but makes identification of phrase code easier and will not error if there are no additional arguments. The first element of the array is the phrase text, and the (unlimited number of) following elements are the variables to be parsed into that phrase.

Parameters

array $phrase_array array containing phrase and arguments

Return Value

string The parsed phrase