【文件属性】:
文件名称:inline:内联堆栈中间件
文件大小:7KB
文件格式:ZIP
更新时间:2021-06-12 21:26:48
PHP
堆栈/内联
内联堆栈中间件。
启用可调用对象作为堆栈中间件的使用。
例子
这是一个人为的示例,展示了如何使用可调用对象轻松充当 silex 应用程序的堆栈中间件:
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;
$app = new Silex\Application();
$app->get('/', function (Request $request) {
if ('success' === $request->attributes->get('callable_middleware')) {
return ne
【文件预览】:
inline-master
----composer.json(683B)
----composer.lock(17KB)
----tests()
--------bootstrap.php(93B)
--------functional()
----LICENSE(1KB)
----src()
--------Stack()
----.gitignore(7B)
----phpunit.xml.dist(698B)
----README.md(2KB)