Merge branch 'dev' into feature/pragma-dot-notation

Conflicts:
	README.markdown
This commit is contained in:
Justin Hileman
2010-04-26 22:03:03 -04:00
9 changed files with 46 additions and 12 deletions
+13
View File
@@ -0,0 +1,13 @@
<?php
class ChildContext extends Mustache {
public $parent = array(
'child' => 'child works',
);
public $grandparent = array(
'parent' => array(
'child' => 'grandchild works',
),
);
}
@@ -0,0 +1,2 @@
<h1>{{#parent}}{{child}}{{/parent}}</h1>
<h2>{{#grandparent}}{{#parent}}{{child}}{{/parent}}{{/grandparent}}</h2>
+2
View File
@@ -0,0 +1,2 @@
<h1>child works</h1>
<h2>grandchild works</h2>
+3 -3
View File
@@ -2,17 +2,17 @@
class Complex extends Mustache {
public $header = 'Colors';
public $item = array(
array('name' => 'red', 'current' => true, 'url' => '#Red'),
array('name' => 'green', 'current' => false, 'url' => '#Green'),
array('name' => 'blue', 'current' => false, 'url' => '#Blue'),
);
public function notEmpty() {
return !($this->isEmpty());
}
public function isEmpty() {
return count($this->item) === 0;
}
+2 -2
View File
@@ -2,13 +2,13 @@
class Delimiters extends Mustache {
public $start = "It worked the first time.";
public function middle() {
return array(
array('item' => "And it worked the second time."),
array('item' => "As well as the third."),
);
}
public $final = "Then, surprisingly, it worked the final time.";
}
+1 -1
View File
@@ -4,6 +4,6 @@ class DoubleSection extends Mustache {
public function t() {
return true;
}
public $two = "second";
}
+2 -2
View File
@@ -2,13 +2,13 @@
class Sections extends Mustache {
public $start = "It worked the first time.";
public function middle() {
return array(
array('item' => "And it worked the second time."),
array('item' => "As well as the third."),
);
}
public $final = "Then, surprisingly, it worked the final time.";
}