DAL can be extended via extensions. These extensions can be called by the user to let DAL perform certain functions which may be handy to let it perform. One example of such an extension is the debugger. Extensions are allowed to override certain functions within DAL. They register themselfs as overriding a certain function and DAL keeps the administration of that override. The extensions also have access to the database driver so they can perform some things which DAL doesn't have to know about.
Extensions are also accessible from your main code. When they get loaded by DAL they will be assigned to a variable with the name of the extension. So by example with the debugger extension you can use the debugMessage function via $foo->debugger->debugMessage("my debugmessage"). Where $foo is an object of the DAL class and the extension is loaded as $foo->loadExtension("debugger"). |