PHPackages                             liip/multiplex-bundle - 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. liip/multiplex-bundle

AbandonedArchivedSymfony-bundle[HTTP &amp; Networking](/categories/http)

liip/multiplex-bundle
=====================

This Bundles enables 'multiplexing' multiple requests into a single Request/Response

1.1.2(13y ago)12482MITPHPPHP &gt;=5.3.2

Since Jan 30Pushed 8y ago57 watchersCompare

[ Source](https://github.com/liip/LiipMultiplexBundle)[ Packagist](https://packagist.org/packages/liip/multiplex-bundle)[ RSS](/packages/liip-multiplex-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

UNMAINTAINED
============

[](#unmaintained)

This bundle is no longer maintained. Feel free to fork it if needed.

Overview [![Build Status](https://camo.githubusercontent.com/f2656ea9f6fff4b90bfc5d3b89e0f113a9d2b726e7724a37ea4ccf09cd107724/68747470733a2f2f7472617669732d63692e6f72672f6c6969702f4c6969704d756c7469706c657842756e646c652e706e67)](https://travis-ci.org/liip/LiipMultiplexBundle)
====================================================================================================================================================================================================================================================================================

[](#overview-)

This Bundles enables "multiplexing" multiple requests into a single Request/Response:

for example this request:

[http://foo.com/multiplex.json?requests\[login\]\[uri\]=/session/new&amp;requests\[notification\]\[uri\]=/notifications&amp;requests\[notification\]\[method\]=get&amp;requests\[notification\]\[parameters\]\[\]=broadcasts&amp;requests\[notification\]\[parameters\]\[\]=personal](http://foo.com/multiplex.json?requests%5Blogin%5D%5Buri%5D=/session/new&requests%5Bnotification%5D%5Buri%5D=/notifications&requests%5Bnotification%5D%5Bmethod%5D=get&requests%5Bnotification%5D%5Bparameters%5D%5B%5D=broadcasts&requests%5Bnotification%5D%5Bparameters%5D%5B%5D=personal)

will internally call:

`/session/new` and `/notifications`

and return **one** Response:

```
{
    "/session/new"   : {"request" : "/session/new", "status": 200, "response": "the Response Content of /session/new"},
    "/notifications" : {"request" : "/notifications", "status": 403, "response": "Forbidden"}
}
```

*Attention*: Installing this Bundle basically lets anyone side step the security firewall. Therefore its important to either secure the multiplex route or to implement security checks inside all relevant controllers

Installation
============

[](#installation)

1. Add this bundle to your project with Composer:

```
```
$ php composer.phar require liip/multiplex-bundle
```

```

2. Add this bundle to your application's kernel:

```
``` php
  // app/AppKernel.php
  public function registerBundles()
  {
      return array(
          // ...
          new Liip\MultiplexBundle\LiipMultiplexBundle(),
          // ...
      );
  }
```

```

Configuration
=============

[](#configuration)

The following Configuration Options exists:

- `allow_externals` : if enabled also external urls can be multiplexed (default: *true*)
- `display_errors` : if enabled and an error occured, the error message will be returned, otherwise (if available) the http status code message (default: *true*)
- `route_option` : only used in combination with `restrict_routes`, defines the route option which should be looked up if `restrict_routes` is on (default: *multiplex\_expose*)
- `restrict_routes` : if enabled only routes with the `route_option` are multiplexable (default: *false*)

Application Configuration
-------------------------

[](#application-configuration)

here the default config

```
liip_multiplex:
    allow_externals: true
    display_errors: true
    route_option: 'multiplex_expose'
    restrict_routes: false
```

Routing Configuration
---------------------

[](#routing-configuration)

if you want to restrict multiplexing to specific routes, define the option in each route you want to expose

```

    MyBundle:Controller:index
    true

```

and don't forget to set `restrict_routes` to `true`!

Usage
=====

[](#usage)

This Bundles provides a decent Javascript Library to use the Multiplexer Endpoint.

Integration of the Javascript
-----------------------------

[](#integration-of-the-javascript)

```
  {% javascripts
  "@LiipMultiplexBundle/Resources/public/js/ajax_multiplexer.js"
    output='js/multiplexer.js'
  %}

  {% endjavascripts %}
```

Using the Javascript `Multiplexer`
----------------------------------

[](#using-the-javascript-multiplexer)

```
//configuring the Multiplexer
Multiplexer.setEndpoint('/path/to/multiplexer/endpoint'); //as in your routing defaults to /multiplex.json
Multiplexer.setFormat('json'); //only useful exchange format

//adding Requests to the Multiplexer
Multiplexer.add(
    {'uri' : '/foo/bar', 'method' : 'GET', 'parameters' : {'foo':'bar'}}, //the Request Object
    function(content) { /* ... */}, // the Success Callback
    function(content) { /* ... */}  // the Error Callback
);

Multiplexer.add(
    {'uri' : 'http://google.com', 'method' : 'GET', 'parameters' : {'q':'Symfony2'}},
    function(content) { /* this callback is called on success for this request*/},
    function(content) { /* this callback is called on error for this request*/}
);

//pushing all Requests to the Server
Multiplexer.call(
    function(r){ /* ... */ }, //the global success callback (optional)
    function(r){ /* ... */ } //the global error callback (optional)
);

//pushing only a set of Requests to the Server
Multiplexer.call(['/foo/bar']);
```

Tests
=====

[](#tests)

1. To run the unit tests, require all dependencies

```
```
$ php composer.phar update --dev
```

```

2. Run PHPUnit

```
```
$ phpunit
```

```

3. See Travis for automated Tests

```
https://travis-ci.org/liip/LiipMultiplexBundle

```

TODO
====

[](#todo)

- more output formats (usable html/xml formats)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 72.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

4

Last Release

4844d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20873?v=4)[Luke Smith](/maintainers/lsmith)[@lsmith](https://github.com/lsmith)

---

Top Contributors

[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (50 commits)")[![digitalkaoz](https://avatars.githubusercontent.com/u/293591?v=4)](https://github.com/digitalkaoz "digitalkaoz (19 commits)")

---

Tags

bundlephpsymfonysymfony-bundlehttp

### Embed Badge

![Health badge](/badges/liip-multiplex-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/liip-multiplex-bundle/health.svg)](https://phpackages.com/packages/liip-multiplex-bundle)
```

###  Alternatives

[friendsofsymfony/http-cache-bundle

Set path based HTTP cache headers and send invalidation requests to your HTTP cache

43813.2M47](/packages/friendsofsymfony-http-cache-bundle)[sofascore/purgatory-bundle

A Symfony bundle for HTTP cache invalidation with support for various backends like Varnish.

11665.0k](/packages/sofascore-purgatory-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
