From fa8c81dcfd04d6b442a94122b59a105d7f5ce082 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Tue, 6 Apr 2010 00:28:02 -0400 Subject: [PATCH] Update README to reflect preferred mustache class implementation. Rendering arbitrary generic view class/array and template is secondary. --- README.markdown | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/README.markdown b/README.markdown index 3e7b62b..bc50bf5 100644 --- a/README.markdown +++ b/README.markdown @@ -26,6 +26,31 @@ And a more in-depth example--this is the canonical Mustache template: {{/in_ca}} +Along with the associated Mustache class: + + value - ($this->value * 0.4); + } + + public $in_ca = true; + } + + +Render it like so: + + render($template); + ?> + + +Here's the same thing, a different way: + Create a view object--which could also be an associative array, but those don't do functions quite as well: render($template, $chris); ?> -Here's the same thing, a different way: - value - ($this->value * 0.4); - } - - public $in_ca = true; - } - - $c = new Chris; - echo $chris->render($template); - ?> Known Issues