diff --git a/examples/sections_iterable_object/Sections_Iterable_Object.php b/examples/sections_iterable_object/Sections_Iterable_Object.php new file mode 100644 index 0000000..ee2f661 --- /dev/null +++ b/examples/sections_iterable_object/Sections_Iterable_Object.php @@ -0,0 +1,17 @@ + 'And it worked the second time.', + 'bar' => 'As well as the third.' + ); + + public function __get($key) + { + return isset($this->_data[$key]) ? $this->_data[$key] : NULL; + } + + public function __isset($key) + { + return isset($this->_data[$key]); + } +} \ No newline at end of file diff --git a/examples/sections_noniterable_object/sections.mustache b/examples/sections_noniterable_object/sections.mustache new file mode 100644 index 0000000..9119608 --- /dev/null +++ b/examples/sections_noniterable_object/sections.mustache @@ -0,0 +1,6 @@ +* {{ start }} +{{# middle }} +* {{ foo }} +* {{ bar }} +{{/ middle }} +* {{ final }} \ No newline at end of file diff --git a/examples/sections_noniterable_object/sections.txt b/examples/sections_noniterable_object/sections.txt new file mode 100644 index 0000000..e6b2d7a --- /dev/null +++ b/examples/sections_noniterable_object/sections.txt @@ -0,0 +1,4 @@ +* It worked the first time. +* And it worked the second time. +* As well as the third. +* Then, surprisingly, it worked the final time. \ No newline at end of file