【文件属性】:
文件名称:psr-7-service-provider
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-05 10:27:34
PHP
Psr7ServiceProvider
Psr7ServiceProvider为应用程序微框架提供集成。
安装
将silex/psr-7-service-provider到项目的composer.json :
{
" require " : {
" marvin_b8/psr-7-service-provider " : " 2.0.x-dev "
}
}
并安装:
php composer.phar install
注册
<?php
$ app -> register ( new Silex \ Provider \ Psr7ServiceProvider ());
用法
Psr-7提供程序提供自动的Psr-7注入:
<?php
$ app -> get ( '/hello' , function (\ Psr \ Http \ Message
【文件预览】:
psr-7-service-provider-2.0
----.gitignore(16B)
----tests()
--------Silex()
----LICENSE(1KB)
----composer.json(709B)
----phpunit.xml.dist(695B)
----README.markdown(1KB)
----src()
--------Silex()