Переглянути джерело

Added a second example. It's still not enough, but better than nothing.

Justin Hileman 15 роки тому
батько
коміт
b1c3e06144
1 змінених файлів з 18 додано та 0 видалено
  1. 18 0
      README.markdown

+ 18 - 0
README.markdown

@@ -50,6 +50,24 @@ And render it:
     echo $m->render($template, $chris);
     ?>
 
+Here's the same thing, a different way:
+
+    <?php
+    class Chris extends Mustache {
+        public $name = "Chris";
+        public $value = 10000;
+    
+        public function taxed_value() {
+            return $this->value - ($this->value * 0.4);
+        }
+    
+        public $in_ca = true;
+    }
+    
+    $c = new Chris;
+    echo $chris->render($template);
+    ?>
+
 
 See Also
 --------