corpus / autoloader
PSR-0 and PSR-4 Style Autoloaders
Installs: 118
Dependents: 0
Suggesters: 2
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
pkg:composer/corpus/autoloader
This package is auto-updated.
Last update: 2022-12-06 05:07:24 UTC
README
Simple PSR-0 and PSR-4 Style Autoloaders.
Notes
The PSR-0 Autoloader does not include the Zend style underscore to / translation.
Installing
Autoloader is available through Packagist via Composer
{ "require": { "corpus/autoloader": "1.*" } }
Usage
These are simple autoloaders, that operate on the SPL autoloader stack order. You use one instance per directory or namespace.
<?php use Corpus\Autoloader\Psr0; use Corpus\Autoloader\Psr4; // PSR-0 Autoloader spl_autoload_register( new Psr0('/vendor/path/blah') ); // PSR-4 Autoloader spl_autoload_register( new Psr4('My\\Prefix', '/vendor/path/blah') );