From 9693695d2b732c5a0298f90db8fabadaee780da6 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Wed, 14 Mar 2012 19:55:26 -0700 Subject: [PATCH] Fix E_STRICT failure in i18n example. --- examples/i18n/I18n.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/i18n/I18n.php b/examples/i18n/I18n.php index 980e649..7e0fcce 100644 --- a/examples/i18n/I18n.php +++ b/examples/i18n/I18n.php @@ -9,12 +9,12 @@ class I18n extends Mustache { public $__ = array(__CLASS__, '__trans'); // A *very* small i18n dictionary :) - private $dictionary = array( + private static $dictionary = array( 'Hello.' => 'Hola.', 'My name is {{ name }}.' => 'Me llamo {{ name }}.', ); - public function __trans($text) { - return isset($this->dictionary[$text]) ? $this->dictionary[$text] : $text; + public static function __trans($text) { + return isset(self::$dictionary[$text]) ? self::$dictionary[$text] : $text; } -} \ No newline at end of file +}