This repository was archived by the owner on Nov 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 11phpunit.xml
22vendor /
33clover.xml
4+ .idea /
Original file line number Diff line number Diff line change 11Autoloader
22==========
33
4+ [ ![ Latest Stable Version] ( https://poser.pugx.org/corpus/autoloader/v/stable.png )] ( https://packagist.org/packages/corpus/autoloader )
5+ [ ![ License] ( https://poser.pugx.org/corpus/autoloader/license.png )] ( https://packagist.org/packages/corpus/autoloader )
6+ [ ![ Build Status] ( https://travis-ci.org/CorpusPHP/Autoloader.svg?branch=master )] ( https://travis-ci.org/CorpusPHP/Autoloader )
7+
48Simple PSR-0 and PSR-4 Style Autoloaders.
59
610
711## Notes
812
913The PSR-0 Autoloader does not include the Zend style underscore to / translation.
14+
15+ ## Installing
16+
17+ Autoloader is available through Packagist via Composer
18+
19+ ``` json
20+ {
21+ "require" : {
22+ "corpus/autoloader" : " 1.*"
23+ }
24+ }
25+ ```
26+
27+ ## Usage
28+
29+ These are * simple* autoloaders, that operate on the SPL autoloader stack order. You use one instance * per* directory or namespace.
30+
31+ ``` php
32+ <?php
33+
34+ use Corpus\Autoloader\Psr0;
35+ use Corpus\Autoloader\Psr4;
36+
37+ // PSR-0 Autoloader
38+ spl_autoload_register( new Psr0('/vendor/path/blah') );
39+
40+ // PSR-4 Autoloader
41+ spl_autoload_register( new Psr4('My\\Prefix', '/vendor/path/blah') );
42+
43+ ```
You can’t perform that action at this time.
0 commit comments