PHP Classes

PHP Autoloading with namespaces: Load classes mapping namespaces to directories

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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: 592 All time: 4,861 This week: 1,464Up
Version License PHP version Categories  
php-autoload-ns 1.0GNU General Publi...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: ???
All time rank: 62317 in Poland Poland
Week rank: 1767 Down48 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 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:592All time:4,861
 This week:0This week:1,464Up
 User Comments (1)