DevShed: Using the spl_autoload() Functions to Build Loader Apps...

Courtesy PHPDeveloper.org  Fri, 07/03/2009 - 07:26

In the next to last article of their loader series, DevShed looks at replacing some of the file loading functionality in their examples with functions from the SPL.

As I mentioned before, the Standard PHP library comes bundled with some helpful functions, such as "spl_autoload()," "spl_register_extension()" and "spl_autoload_register()" that allow you to either use a default implementation of the "__autoload()" function, or create a custom one for it.

Their example defines the...


 

More related items

DevShed: Using Directory Iterators to Build Loader...
DevShed finishes off their "loader" series of tutorials today with this eighth part focusing on the use of Directory Iterators. Here's where the SPL comes in, since it's possible to use a...

Jeremy Cook's Blog: Using the Countable Interface
In a recent post to his blog Jeremy Cook has a tutorial about using the Countable interface (part of the SPL) in your objects to make them play nicely with functions like count. PHP...

Adam Gotterer's Blog: Building an Object Collection...
Adam Gotterer has written up a tutorial with his process behind creating an object collection manager with PHP's built-in SPL functionality. The purpose of a collection is to store objects...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com