Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
Elgg\I18n\MessageTemplate Class Reference

WARNING: API IN FLUX. More...

Inheritance diagram for Elgg\I18n\MessageTemplate:
Elgg\I18n\SprintfMessageTemplate

Public Member Functions

 __construct ($template)
 Constructor. More...
 
 format (array $args)
 Applies the inputs to the message template and returns the result. More...
 
 __toString ()
 Get the string template this message uses for translation. More...
 

Protected Attributes

 $template
 

Detailed Description

WARNING: API IN FLUX.

DO NOT USE DIRECTLY.

A single localizable message template.

We introduced this class because we want to have the flexibility of easily switching our message template language from sprintf to ICU...

Example messages:

Since
1.11

private

Definition at line 20 of file MessageTemplate.php.

Constructor & Destructor Documentation

Elgg\I18n\MessageTemplate::__construct (   $template)

Constructor.

Parameters
string$templateThe message template

Definition at line 29 of file MessageTemplate.php.

Member Function Documentation

Elgg\I18n\MessageTemplate::__toString ( )

Get the string template this message uses for translation.

Returns
string

Definition at line 47 of file MessageTemplate.php.

Elgg\I18n\MessageTemplate::format ( array  $args)
abstract

Applies the inputs to the message template and returns the result.

Parameters
array$argsThe inputs to this message
Returns
string The rendered including all the interpolated inputs

Member Data Documentation

Elgg\I18n\MessageTemplate::$template
protected

Definition at line 22 of file MessageTemplate.php.


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