KO
|
EN
gitlite — search
Search
#python
#javascript
#php
#ruby
#hacktoberfest
#html
#c
#macos
#arduino
#puppet
#scala
#blog
LazyHttpKernel
★ 31
Open GitHub ↗
HttpKernelInterface lazy proxy.
Download README (.md)
Explore Similar Repositories
GBToolbox
:
Goonbee's iOS development toolbox
liblist
:
Generic Linked list Management Library in C
Adafruit_LSM303
:
Driver for Adafruit's LSM303DLHC breakout
Flask_docs_cn
:
flask 0.10.1 docs 中文版
website
:
Hacking the Shell
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
LazyHttpKernel
?
Download (.md)
# Stack/LazyHttpKernel HttpKernelInterface lazy proxy. This is useful in combination with something like UrlMap, where sub-kernels are only created conditionally. ## Example The basic example, assumes that `app.php` returns an instance of `HttpKernelInterface`: ```php use Stack\LazyHttpKernel; $app = new LazyHttpKernel(function () { return require __DIR__.'/../app.php'; }); ``` As a shortcut, you can use the `Stack\lazy` function: ```php use Stack; $app = Stack\lazy(function () { return require __DIR__.'/../app.php'; }); ``` When combined with the UrlMap middleware it makes a bit more sense: ```php use Stack; use Stack\UrlMap; $app = ...; $app = new UrlMap($app, [ '/foo' => Stack\lazy(function () { return require __DIR__.'/../app.php'; }) ]); ```