Adding examples.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
Hello {{name}}
|
||||
You have just won ${{value}}!
|
||||
{{#in_ca}}
|
||||
Well, ${{ taxed_value }}, after taxes.
|
||||
{{/in_ca}}
|
||||
@@ -0,0 +1,3 @@
|
||||
Hello Chris
|
||||
You have just won $10000!
|
||||
Well, $6000, after taxes.
|
||||
Reference in New Issue
Block a user