examples.inc 337 B

1234567891011121314151617181920212223
  1. <?php
  2. class IncludeFiles extends ArrayIterator
  3. {
  4. function __construct($path, $classes)
  5. {
  6. parent::__construct();
  7. foreach($classes as $c)
  8. {
  9. $this->append($path . '/' . strtolower($c) . '.inc');
  10. }
  11. }
  12. }
  13. $classes = array(
  14. );
  15. foreach (new IncludeFiles(dirname(__FILE__). '/..', $classes) as $file)
  16. {
  17. require_once($file);
  18. }
  19. ?>