How about naming your classes like this:
Code:
/iterator/Iterator.php
/iterator/IteratorQuery.php
/iterator/IteratorQueryReverse.php
i.e. classSubclassSubclass2Subclass3Etc.php. When this is sorted alphabetically, the parent class will always be included before the subclass.
But it's not a nice solution. I think that a class file should always files for the other classes/interfaces it needs / extends / implements.
Does it really hurt that much to put a statement like
PHP Code:
require_once 'iterator/Iterator.php';
at the top of each file?
Bookmarks