Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
Merge branch '2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
Joan Fabrégat committed Oct 9, 2018
2 parents b7185a7 + 5bb85d8 commit 198797e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $assetsMiddleware->setAllowMediaTypes([
$assetsMiddleware->process($aPsr7ServerRequest, $aPsr15RequestHandler); // <-- returns a PSR-7 response
```

### Using multiple resolver
### Using multiple resolvers

```php
<?php
Expand All @@ -38,10 +38,8 @@ use CodeInc\AssetsMiddleware\Resolvers\AssetResolverAggregator;
$assetsMiddleware = new AssetsMiddleware(
new AssetResolverAggregator([
new StaticAssetsResolver(['/favicon.ico' => '/local/favicon/file.ico']),
new AssetsDirectoryResolver(
'/path/to/my/assets/assets/', // <-- directory path
'/assets/' // <-- assets URI prefix
)
new AssetsDirectoryResolver('/path/to/my/css/', '/css/'),
new AssetsDirectoryResolver('/path/to/my/images/', '/images/')
])
);

Expand Down

0 comments on commit 198797e

Please sign in to comment.