Alright, here is my deal: I have a directory that contains other directories (ok, don't laugh yet.)

I have a function that will include class files from inside of the internal directories. The function sorts the files in the directory alphabetically, and then includes them one by one.

This works great, but if a child class comes alphabetically before a superclass, ex// 'DirectoryIterator', and 'Iterator' (which is coincedentaly one of my problems ), then as soon as DirectoryIterator.php is included, it complains that it can't find superclass Iterator.

Does anyone know a way that I can just shut PHP up until all of the include statements have been run? That seems a little hacky, so maybe there is some way to do it that at least in theory sounds better?

If anyone has run into this problem before, you probably have a good idea of what i'm talking about.

Just ask for further clarification if you need it. Thanks a million, guys (and gals, i assume )