PHP 小型分发库 PHP ATC
- 授权协议: MIT
- 开发语言: PHP
- 操作系统: 跨平台
- 软件首页: https://github.com/aol/atc
- 软件文档: https://github.com/aol/atc
软件介绍
ATC 是一个 PHP 的小型分发库,基于 Aura.Router 包和 Symfony 的 HttpFoundation 、EventDispatcher 构建。
关于该库需要知道的两项内容:
每个单一路由匹配到一个单一的 Action 类
Action 的异常处理可通过实现 ActionInterface 变成一个新的 Action
Action 是什么?Action 就是只提供一个方法的 Controller。
示例代码:
$router->addGet('Index', '/');
namespace Your\Namespace\Prefix;
class Index extends \Aol\Atc\Action
{
public function __invoke(Request $request)
{
return new Response::create('Hello world');
}
}
Code Reading
Diomidis Spinellis / Addison-Wesley Professional / 2003-06-06 / USD 64.99
This book is a unique and essential reference that focuses upon the reading and comprehension of existing software code. While code reading is an important task faced by the vast majority of students,......一起来看看 《Code Reading》 这本书的介绍吧!
