Login   Register  
PHP Classes
elePHPant
Icontem

Abbey's Autoloader

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author  
Picture of Abbey Sparrow
Name: Abbey Sparrow <e-mail contact>
Packages: 4 Browse all classes by Abbey Sparrow Browse all classes by
Country: United States United States - PHP jobs in United States
Age: 35
All time rank: 72091 in United States United States
Week rank: 655 Up68 in United States United States Up
Innovation award
Innovation award
Nominee: 2x


  Detailed description   Download .zip .tar.gz  
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.

  Classes of Abbey Sparrow  >  Abbey's Autoloader  >  Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Abbey's Autoloader
Base name: abtoloader
Description: Load classes automatically from directories
Version: 1.0
PHP version: 5.0
License: BSD License
All time users: 953 users
All time rank: 3305
Week users: 1 user
Week rank: 1988 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  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


  User ratings  
There are not enough user ratings to display for this class.

  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 folder image 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.