Erebot  latest
A modular IRC bot for PHP 5.3+
Erebot\Styling\Variables\StringVariable Class Reference

A class used to format strings. More...

+ Inheritance diagram for Erebot\Styling\Variables\StringVariable:

Public Member Functions

 __construct ($value)
 
 getValue ()
 
 render (\Erebot\IntlInterface $translator)
 

Protected Attributes

 $value
 The value to format.
 

Detailed Description

A class used to format strings.

Note
Actually, strings are rendered "as is", without any special formatting applied, so this class can safely be used as a passthrough.

Definition at line 33 of file StringVariable.php.

Constructor & Destructor Documentation

Erebot\Styling\Variables\StringVariable::__construct (   $value)

Constructor.

Parameters
string$valueThe value to format. It must support conversions to the string type.

Definition at line 46 of file StringVariable.php.

References Erebot\Styling\Variables\StringVariable\$value.

Member Function Documentation

Erebot\Styling\Variables\StringVariable::getValue ( )

Returns the value stored in this object.

Return values
mixedValue stored in this object.

Implements Erebot\Styling\VariableInterface.

Definition at line 56 of file StringVariable.php.

References Erebot\Styling\Variables\StringVariable\$value.

Erebot\Styling\Variables\StringVariable::render ( \Erebot\IntlInterface  $translator)

Renders the content of this variable.

Parameters
Erebot::IntlInterface$translatorA translator that can be used to change the rendering depending on the target locale.
Return values
stringThe variable rendered as a string.

Implements Erebot\Styling\VariableInterface.

Definition at line 51 of file StringVariable.php.

References Erebot\Styling\Variables\StringVariable\$value.


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