SectionIteratorObjects.php 396 B

123456789101112131415161718
  1. <?php
  2. class SectionIteratorObjects
  3. {
  4. public $start = 'It worked the first time.';
  5. protected $_data = array(
  6. array('item' => 'And it worked the second time.'),
  7. array('item' => 'As well as the third.'),
  8. );
  9. public function middle()
  10. {
  11. return new ArrayIterator($this->_data);
  12. }
  13. public $final = 'Then, surprisingly, it worked the final time.';
  14. }