01-17-2009, 02:32 PM
|
#6 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
|
Quote:
Originally Posted by Village Idiot
I understand replacing the periods, that makes sense, but why strip out the layer that we put the class files in?
|
By layer I assume you mean the class. / interface. part of the filename?
My reasoning is that if we use an autoload (which makes things mcuh easier) there's no way to tell whether it's an interface or a class that needs to be loaded. Stripping out that identifier from the name makes things a little easier. Otherwise we'd have to include both class_name.php and interface_name.php (which isn't too good) and check which one wasn't included.
Thinking about it, the require in my method should be an include - otherwise it will just fatal the app before we even get to the exception.
|
|
|
|