Files
Mustache/examples/grand_parent_context/GrandParentContext.php
T

24 lines
608 B
PHP

<?php
class GrandParentContext extends Mustache {
public $grand_parent_id = 'grand_parent1';
public $parent_contexts = array();
public function __construct() {
parent::__construct();
$this->parent_contexts[] = array('parent_id' => 'parent1', 'child_contexts' => array(
array('child_id' => 'parent1-child1'),
array('child_id' => 'parent1-child2')
));
$parent2 = new stdClass();
$parent2->parent_id = 'parent2';
$parent2->child_contexts = array(
array('child_id' => 'parent2-child1'),
array('child_id' => 'parent2-child2')
);
$this->parent_contexts[] = $parent2;
}
}