【文件属性】:
文件名称:Routing:更多 一个简单的 PHP 路由器
文件大小:27KB
文件格式:ZIP
更新时间:2021-06-30 12:53:38
PHP
路由
更多一个简单的 PHP 路由库。
您需要了解 。
安装
:
{
" felipecwb/routing " : " dev-master "
}
示例:
<?php
use Felipecwb \ Routing \ Router ;
// Exceptions
use Felipecwb \ Routing \ Exception \ ResolverException ;
use Felipecwb \ Routing \ Exception \ RouteNotFoundException ;
$ router = Router :: create ();
$ router -> add ( '/' , function () {
echo "Hello World!" ;
});
$ router -> add ( '/hello/(\w+)' ,
【文件预览】:
Routing-master
----composer.json(680B)
----.travis.yml(134B)
----phpunit.xml(258B)
----build.xml(1KB)
----tests()
--------RouterTest.php(8KB)
--------Resolver()
--------Rules()
--------MatcherTest.php(3KB)
--------RouteCollectionTest.php(3KB)
--------RouteTest.php(4KB)
----LICENSE(1KB)
----.gitignore(56B)
----lib()
--------RouteCollection.php(2KB)
--------Router.php(5KB)
--------Resolver()
--------Rules()
--------Matcher.php(3KB)
--------Route.php(3KB)
--------Exception()
----README.md(2KB)