summaryrefslogtreecommitdiff
path: root/ext/spl/examples/tests/examples.inc
blob: 74b652adb521f33c2cf245fb32db049eff0a204c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

class IncludeFiles extends ArrayIterator
{
	function __construct($path, $classes)
	{
		parent::__construct();
		foreach($classes as $c)
		{
			$this->append($path . '/' . strtolower($c) . '.inc');
		}
	}
}

$classes = array(
	'EmptyIterator',
	'InfiniteIterator',
	'AppendIterator',
	'NoRewindIterator',
);

foreach (new IncludeFiles(dirname(__FILE__). '/..', $classes) as $file)
{
	require_once($file);
}

?>