Pārlūkot izejas kodu

Added [currently failing] test case for recursive partials.

Justin Hileman 15 gadi atpakaļ
vecāks
revīzija
dff5300932

+ 15 - 0
examples/recursive_partials/RecursivePartials.php

@@ -0,0 +1,15 @@
+<?php
+
+class RecursivePartials extends Mustache {
+	protected $_partials = array(
+		'child' => "* {{ name }}",
+	);
+
+	public $name  = 'George';
+	public $child = array(
+		'name' => 'Dan',
+		'child' => array(
+			'name' => 'Justin',
+		)
+	);
+}

+ 4 - 0
examples/recursive_partials/recursive_partials.mustache

@@ -0,0 +1,4 @@
+* {{name}}
+{{#child}}
+{{>child}}
+{{/child}}

+ 3 - 0
examples/recursive_partials/recursive_partials.txt

@@ -0,0 +1,3 @@
+* George
+* Dan
+* Justin