Login   Register  
PHP Classes

PHP Namespace Autoload : Autoload classes with namespaces from 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 (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2013-11-06 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 292 This week: 3All time: 6,672 This week: 554Up
Version License PHP version Categories  
namespace-autoloader 1GNU Lesser General Publ...5.3PHP 5, Language
Description Author  

This class can autoload classes with namespaces from directories.

It can register a class autoload function that takes the class name eventually with a namespace prefix, splits the namespace parts and assembles it to form a class path that maps its namespace part into directories.

Then it checks if a script file exists in the assembled path with the suffix .class.php. If it exists, the class script is loaded.

Picture of Jan Altensen
Name: Jan Altensen <contact>
Classes: 8 packages by
Country: Germany Germany
Age: 21
All time rank: 153199 in Germany Germany
Week rank: 122 Up3 in Germany Germany Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Files folder imageexample (1 file, 1 directory)
Plain text file autoload.class.php Class autoloader class

  Files folder image Files  /  example  
File Role Description
Files folder imagetest (1 file)
  Plain text file index.php Example example

  Files folder image Files  /  example  /  test  
File Role Description
  Plain text file bla.class.php Aux. example

 Version Control Unique User Downloads Download Rankings  
 0%Total:292All time:6,672
 This week:3This week:554Up