SectionIteratorObjects.php 607 B

123456789101112131415161718192021222324252627
  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 SectionIteratorObjects
  11. {
  12. public $start = 'It worked the first time.';
  13. protected $_data = array(
  14. array('item' => 'And it worked the second time.'),
  15. array('item' => 'As well as the third.'),
  16. );
  17. public function middle()
  18. {
  19. return new ArrayIterator($this->_data);
  20. }
  21. public $final = 'Then, surprisingly, it worked the final time.';
  22. }