Adding examples.

This commit is contained in:
Justin Hileman
2010-03-30 14:57:18 -04:00
parent a51146f5e2
commit 5e99b15252
12 changed files with 82 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
<?php
class Simple extends Mustache {
public $name = "Chris";
public $value = 10000;
public function taxed_value() {
return $this->value - ($this->value * 0.4);
}
public $in_ca = true;
};
+5
View File
@@ -0,0 +1,5 @@
Hello {{name}}
You have just won ${{value}}!
{{#in_ca}}
Well, ${{ taxed_value }}, after taxes.
{{/in_ca}}
+3
View File
@@ -0,0 +1,3 @@
Hello Chris
You have just won $10000!
Well, $6000, after taxes.