PHPackages                             stack/url-map - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. stack/url-map

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

stack/url-map
=============

URL Map middleware.

v1.2.0(7y ago)4516.6k11[1 issues](https://github.com/stackphp/url-map/issues)1MITPHPPHP ^7.1

Since Nov 14Pushed 7y ago3 watchersCompare

[ Source](https://github.com/stackphp/url-map)[ Packagist](https://packagist.org/packages/stack/url-map)[ RSS](/packages/stack-url-map/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (6)Versions (5)Used By (1)

URL Map Stack Middleware
========================

[](#url-map-stack-middleware)

[![Build Status](https://camo.githubusercontent.com/234dda080d44784a2be89a4c7e8f7c0d72e9afbe9cf8558557891b39296bc551/68747470733a2f2f7472617669732d63692e6f72672f737461636b7068702f75726c2d6d61702e706e67)](https://travis-ci.org/stackphp/url-map)

The `UrlMap` class takes an array mapping paths to apps and dispatches accordingly. This class is insertable into a Middleware Stack Builder, like [stack/builder](http://github.com/stackphp/builder).

Install
-------

[](#install)

Install with Composer:

```
$ composer require stack/url-map
```

Example
-------

[](#example)

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

```
