Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar authored Mar 11, 2018
1 parent bd0545b commit ce27b2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ foreach ($section as $autoload) {
Add a new psr autoload definition into an existing composer.json file and save it:

```php
// create reader
$reader = new ComposerReader('path/to/composer.json');

// generate new autoload section object
$new = new Autoload($reader, 'Foo\\Bar\\', 'src/foo/bar', AutoloadSection::TYPE_PSR4);

// store the new autoload object into the autoload section
$section = new AutoloadSection($reader);
$section->add($new)->save();
```

0 comments on commit ce27b2a

Please sign in to comment.