Elgg  Version 3.0
MessageTemplate.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\I18n;
4 
20 abstract class MessageTemplate {
21 
23  protected $template;
24 
30  public function __construct($template) {
31  $this->template = $template;
32  }
33 
41  abstract public function format(array $args);
42 
48  public function __toString() {
49  return $this->template;
50  }
51 }
__toString()
Get the string template this message uses for translation.
format(array $args)
Applies the inputs to the message template and returns the result.
$args
Some servers don&#39;t allow PHP to check the rewrite, so try via AJAX.
__construct($template)
Constructor.
WARNING: API IN FLUX.