Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
MessageTemplate.php
Go to the documentation of this file.
1 <?php
2 namespace Elgg\I18n;
3 
20 abstract class MessageTemplate {
22  protected $template;
23 
29  public function __construct($template) {
30  $this->template = $template;
31  }
32 
40  public abstract function format(array $args);
41 
47  public function __toString() {
48  return $this->template;
49  }
50 }
__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't allow PHP to check the rewrite, so try via AJAX.
__construct($template)
Constructor.
WARNING: API IN FLUX.