GrandParentContext.php 608 B

123456789101112131415161718192021222324
  1. <?php
  2. class GrandParentContext extends Mustache {
  3. public $grand_parent_id = 'grand_parent1';
  4. public $parent_contexts = array();
  5. public function __construct() {
  6. parent::__construct();
  7. $this->parent_contexts[] = array('parent_id' => 'parent1', 'child_contexts' => array(
  8. array('child_id' => 'parent1-child1'),
  9. array('child_id' => 'parent1-child2')
  10. ));
  11. $parent2 = new stdClass();
  12. $parent2->parent_id = 'parent2';
  13. $parent2->child_contexts = array(
  14. array('child_id' => 'parent2-child1'),
  15. array('child_id' => 'parent2-child2')
  16. );
  17. $this->parent_contexts[] = $parent2;
  18. }
  19. }