Skip to content

chevronphp/Autoloader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autoloader

Latest Stable Version License Build Status Scrutinizer Code Quality

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') );

About

Simple PSR-0 and PSR-4 Style Autoloaders

Resources

License

Stars

Watchers

Forks

Packages

No packages published