Skip to content
This repository was archived by the owner on Nov 24, 2022. It is now read-only.

Commit 74d9c2d

Browse files
committed
README updated
1 parent 6d822cd commit 74d9c2d

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
phpunit.xml
22
vendor/
33
clover.xml
4+
.idea/

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,43 @@
11
Autoloader
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+
48
Simple PSR-0 and PSR-4 Style Autoloaders.
59

610

711
## Notes
812

913
The 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+
```

0 commit comments

Comments
 (0)