View Single Post
Old 05-09-2009, 05:17 PM   #3 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Wildhoney View Post
How about Loader and Exception classes, too?

Loader Class
Loads your classes in runtime so that you don't have to place include_once all over the place. You would do something like Loader::loadClass('Me.php');, and also attempts to automatically load classes when you make the call to a specific class.

Exception Class
Allows you to set different types of exceptions for different types of errors. Such as a base exception class, with child exception classes for everything, from database exceptions to loader exceptions and beyond...
Thanks WH,

is the loader class considered "lazy loading"?

Also, how does this work exactly? If the pagination class needs access to the database, do I start the class like this?

class pagination inherits database {


}


Or do I not even have to do that? Does each class file have to call Loader::loadClass('Me.php');

Or is that done in my main header.html file?

But this sounds very ideal and I would like to implement it...

As for the exception class, we'll have to get into that afterwards, I don't know enough about that stuff...


EDIT: Also, does the "Me.php" file just include all the classes?
allworknoplay is offline  
Reply With Quote