I have a iterator like this one:
http://nz.php.net/manual/en/class.iterator.php
And I was wondering how could I implement a method that runs when the objects have finished iterating.
For eg
foreach($objects as $object){
...
}
// here it's finished, and I want to automatically do something
Example for extending an Iterator: