PHPackages                             bangpound/legacy-php-http-kernel - 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. bangpound/legacy-php-http-kernel

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

bangpound/legacy-php-http-kernel
================================

Symfony HttpKernel for supporting controllers that exit or return null.

1.1.1(12y ago)1134MITPHPPHP &gt;=5.3.3

Since Mar 28Pushed 12y ago2 watchersCompare

[ Source](https://github.com/bangpound/LegacyPhpHttpKernel)[ Packagist](https://packagist.org/packages/bangpound/legacy-php-http-kernel)[ RSS](/packages/bangpound-legacy-php-http-kernel/feed)WikiDiscussions master Synced 2d ago

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

Legacy PHP HttpKernel
=====================

[](#legacy-php-httpkernel)

[![Build Status](https://camo.githubusercontent.com/20afc04dd9a5ba0474910fc6617609f337ea76680cf9a1cfe73c1bbe057cb67a/68747470733a2f2f7472617669732d63692e6f72672f62616e67706f756e642f4c6567616379506870487474704b65726e656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bangpound/LegacyPhpHttpKernel)

Controllers in legacy PHP applications don't return Symfony Response objects, and they might return nothing or even exit. These low-level Symfony components provide a simple bridge to legacy PHP applications.

Usage
-----

[](#usage)

Use the `HttpKernel` class and add the `ShutdownListener` and `OutputBufferListener`subscribers to the `EventDispatcher`.

Working Example #1
------------------

[](#working-example-1)

This component is used in [Drufony](http://drufony.github.io/) to run Drupal 7 in the Symfony2 framework.

Working Example #2
------------------

[](#working-example-2)

- Download and expand a recent version of [WordPress](http://wordpress.org).
- In the WordPress directory, create `composer.json`:

```
{
	"require": {
		"bangpound/legacy-php-http-kernel": "1.0.*"
	}
}
```

- Run `composer install`.
- Replace WordPress's `index.php` front controller:

```
