|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
Interface for styling (formatting) capabilities. More...
Inheritance diagram for Erebot\StylingInterface:Public Member Functions | |
| _ ($template, array $vars=array()) | |
| __construct (\Erebot\IntlInterface $translator) | |
| getTranslator () | |
| render ($template, array $vars=array()) | |
Interface for styling (formatting) capabilities.
This interface provides constants to format messages before they can be sent. It also provides a method to render templates easily.
Definition at line 31 of file StylingInterface.php.
| Erebot\StylingInterface::__construct | ( | \Erebot\IntlInterface | $translator | ) |
Constructs a new renderer.
| Erebot::IntlInterface | $translator | A translator that can be used to improve the rendering process. |
Implemented in Erebot\Styling.
| Erebot\StylingInterface::_ | ( | $template, | |
| array | $vars = array() |
||
| ) |
Alias for Erebot::StylingInterface::render(), compatible with internationalization tools such as xgettext.
| string | $template | A template to render. |
| array | $vars | (optional) An array of variables that can be used to change the way the template will be rendered. |
| string | The formatted result for this template. |
Implemented in Erebot\Styling.
| Erebot\StylingInterface::getTranslator | ( | ) |
Returns the translator associated with this formatter.
| Erebot::IntlInterface | Translator associated with this formatter. |
Implemented in Erebot\Styling.
| Erebot\StylingInterface::render | ( | $template, | |
| array | $vars = array() |
||
| ) |
Renders a template using the given variables.
| string | $template | A template to render. |
| array | $vars | (optional) An array of variables that can be used to change the way the template will be rendered. |
| string | The formatted result for this template. |
Implemented in Erebot\Styling.