Login   Register  
PHP Classes
elePHPant
Icontem

PHP Autoloading with namespaces: Load classes mapping namespaces to directories

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2012-05-19 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 586 This week: 1All time: 4,791 This week: 1,397Up
Version License PHP version Categories  
php-autoload-ns 1.0GNU General Public Lice...5.3PHP 5, Language
Description Author  

This class can load classes mapping namespaces to directories.

It register a class automatic loader function that loads class files based on the classes' namespace and class name.

The namespace backslash and the class name underscores are mapped to directory separator characters to find the class file path.

The base include directory paths and the class file name prefix are configurable parameters.

Picture of Sebastian Potasiak
Name: Sebastian Potasiak <contact>
Classes: 8 packages by
Country: Poland Poland
Age: 21
All time rank: 62417 in Poland Poland
Week rank: 1080 Down29 in Poland Poland Down
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Files folder imageclasses (1 file, 1 directory)
Accessible without login Plain text file README.md Doc. Read this before you use this class
Accessible without login Plain text file example.php Example Example of using loader

  Files folder image Files  /  classes  
File Role Description
Files folder imageMyPackage (1 file)
  Plain text file loader.php Class Main loader class

  Files folder image Files  /  classes  /  MyPackage  
File Role Description
  Plain text file Test.php Class Class used for example

 Version Control Unique User Downloads Download Rankings  
 0%Total:586All time:4,791
 This week:1This week:1,397Up
 User Comments (1)