Login   Register  
PHP Classes
elePHPant
Icontem

Class: Abbey's Autoloader

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Abbey Sparrow  >  Abbey's Autoloader  >  Download .tar.gz .zip  >  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
Related classes: , , , , ,
Version: 1.0
PHP version: 5.0
License: BSD License
All time users: 807 users
All time rank: 3443
Week users: 4 users
Week rank: 930
Picture of Abbey Sparrow
Author: Abbey Sparrow <e-mail contact>
Packages: 4 Browse this author's classes Browse this author's classes
Country: United States United States - PHP jobs in United States
Age: 34
All time rank: 75195 in United States United States
Week rank: 362 Up42 in United States United States Up
Innovation award
Innovation award
Nominee: 2x


  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.

 

  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

  Rate classes User ratings   Applications   Files Files  

  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.