Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ accordingly. This class is insertable into a Middleware Stack Builder, like

Install with Composer:

% curl -sS https://getcomposer.org/installer | php
% php composer.phar require chh/url-map:~1.0@dev
```bash
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar require chh/url-map:~1.0@dev
```

## Example

Let's say we have a Silex app and want to map an blogging app which
Let's say we have a Silex app and want to map a blogging app which
implements HttpKernelInterface at the sub path `/blog`:

```php
Expand All @@ -39,8 +41,8 @@ $map = [
];

$app = (new Stack\Builder())
->push('Stack\UrlMap', $map)
->resolve($app);
->push('Stack\UrlMap', $map)
->resolve($app);

$request = Request::createFromGlobals();

Expand Down