Login   Register  
PHP Classes

Class: Abbey's Autoloader

Icontem
elePHPant

  Classes of Abbey Sparrow  >  Abbey's Autoloader  >  Download  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Abbey's Autoloader Support forum
Base name: abtoloader
Description: Load classes automatically from directories
Version: 1.0
Required PHP version: 5.0
License: BSD License
 
  Author   Group folder image Groups   Detailed description  
  Applications   Files Files  

Author

Picture of Abbey Sparrow
Name: Abbey Sparrow <e-mail contact>
Published packages: 4 Browse this author's classes Browse this author's classes
Country: United States United States - PHP jobs in United States
Home page: http://abbeyhawksparrow.com/

Groups

Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Language Constructs to assist in the language control View top rated classes

Detailed description

The key part of this class is that it *autoloads based on scope* (EDITORS: Please do not delete this).

What this means is that when an autoload happens, the loader will prefer the declarations that occurred in the file the autoload event happened in, and only afterwards default to the global scope. In the event a class definition cannot be loaded a dummy class is passed back into the execution context which throws an error during construction. This allows class definition errors to be caught as well as delivering their stacktrace.

Because this scope allows the use of packages and namespaces (to a very limited extent), I have included an _import() function which uses a Java-like syntax, for those of us who prefer that. It currently enforces a '<name>.class.php' naming convention for autoloaded classes.

Applications that use this class

No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

Files

File Role Description
Plain text file Autoloader.class.php Class The main class
Download all files: abtoloader.tar.gz abtoloader.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.