文件名称:spiffy-route:Spiffy\Route 是一个轻量级、HHVM 兼容且无依赖的路由器库
文件大小:13KB
文件格式:ZIP
更新时间:2024-07-20 02:30:15
PHP
漂亮\路线 安装 Spiffy\Route 可以使用 composer 安装,它会为你设置任何自动加载。 composer require spiffy/spiffy-route 此外,您可以下载或克隆存储库并设置您自己的自动加载。 添加路由 use Spiffy \ Route \ Router ; $ router = new Router (); // Basic route with name $ router -> add ( 'foo' , '/foo' ); // matches /foo // Basic route with no name $ router -> add ( null , '/foo' ); // matches /foo // Route with tokens $ router -> add ( 'foo' , '/foo/{name}' );
【文件预览】:
spiffy-route-master
----.scrutinizer.yml(335B)
----src()
--------RouteFactory.php(530B)
--------Exception()
--------Router.php(2KB)
--------Route.php(4KB)
--------Twig()
--------RouteMatch.php(1KB)
----.travis.yml(539B)
----test()
--------RouterTest.php(3KB)
--------RouteMatchTest.php(2KB)
--------RouteTest.php(5KB)
--------RouteFactoryTest.php(1KB)
--------Twig()
--------phpunit.xml(459B)
----LICENSE.md(1KB)
----README.md(3KB)
----.gitignore(27B)
----composer.json(669B)