I am trying to make by classes Iterable by implementing Iterator Aggregate & Iterator interfaces. But whenever my class implemets any of these, I get a Class Not Found error for that class. So, how can I make my class Iterable???
class Collection implements IteratorAggregate { private $item = array(); public function getIterator() { return new MyIterator($this->item); } .... More Code } class Another { function __construct() { $col = new Collection(); //Gives Class 'Coolection' not found } } PHP: