GrandParentContext.php 866 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of Mustache.php.
  4. *
  5. * (c) 2010-2016 Justin Hileman
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. class GrandParentContext
  11. {
  12. public $grand_parent_id = 'grand_parent1';
  13. public $parent_contexts = array();
  14. public function __construct()
  15. {
  16. $this->parent_contexts[] = array('parent_id' => 'parent1', 'child_contexts' => array(
  17. array('child_id' => 'parent1-child1'),
  18. array('child_id' => 'parent1-child2'),
  19. ));
  20. $parent2 = new stdClass();
  21. $parent2->parent_id = 'parent2';
  22. $parent2->child_contexts = array(
  23. array('child_id' => 'parent2-child1'),
  24. array('child_id' => 'parent2-child2'),
  25. );
  26. $this->parent_contexts[] = $parent2;
  27. }
  28. }