Permalink
Browse files

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

  • Loading branch information...
1 parent b2666da commit b1c3e06144c96b57c3e3107cd2d4fe9cf09b6083 @bobthecow committed Mar 29, 2010
Showing with 18 additions and 0 deletions.
  1. +18 −0 README.markdown
View
@@ -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
--------

0 comments on commit b1c3e06

Please sign in to comment.