Autoload
I have been looking around for some good examples to use the new PHP autoloader interoperability standard according to the PHP Standards Recommendation #0 (PSR-0).
And since I could find anything good, I had to figure it out by my self, here is the result.
gist id=3027247
HowTo:
<?php # Adds your library to the beginning of the php include path addInclude('~/code/libs', FALSE); $loader = new SplClassLoader(); # adds the php include path to the class $loader->setIncludePathLookup(true); $loader->add('Zend'); $loader->add('PEAR'); # Give the path if it isn't in the php include path like this $loader->add('Symfony', '/path/to/symfony'); $loader -> register(); ?