PHP Classes

Namespace-aware autoloader: Load classes automatically supporting namespaces

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 509 All time: 5,771 This week: 206Up
Version License PHP version Categories
ns-autoloader 1.0GNU General Publi...5.3PHP 5, Language
Description 

Author

This package can load classes automatically supporting namespaces.

It can scan a given directory recursively to find files ending in .php. The files are parsed to extract the class names as well their namespaces.

The scanned class files are stored in a cache files to avoid subsequent scanning overhead.

Innovation Award
PHP Programming Innovation award nominee
September 2011
Number 9
PHP now started supporting namespaces in version 5.3. This means that classes may have their names prefixed by the namespace name.

This class implements an automatic class file loader that takes in consideration the namespace used to load the class.

It can scan class files in given directories and identify the namespace that may be included in the class names, so the class matching takes in consideration the namespace to load the correct class.


Manuel Lemos
Picture of Richard Keizer
  Performance   Level  
Name: Richard Keizer <contact>
Classes: 7 packages by
Country: The Netherlands The Netherlands
Age: 49
All time rank: 48213 in The Netherlands The Netherlands
Week rank: 170 Up5 in The Netherlands The Netherlands Up
Innovation award
Innovation award
Nominee: 5x

Winner: 1x

  Files folder image Files (1)  
File Role Description
Plain text file autoloader.php Class the class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:509
This week:0
All time:5,771
This week:206Up