ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Toro - 基于PHP的REST开发框架

Toro - 基于PHP的REST开发框架

原创 Linux操作系统 作者:jieforest 时间:2012-08-26 08:41:17 0 删除 编辑
Toro is a PHP router for developing RESTful web applications and APIs. It is designed for minimalists who want to get work done.

Features

1. RESTful routing using strings, regular expressions, and defined types (number, string, alpha)
2. Flexible error handling and callbacks via ToroHook
3. Intuitive and self-documented core (toro.php)
4. Tested with PHP 5.3 and above

"Hello, world"

The canonical "Hello, world" example:

CODE:


class HelloHandler {
    function get() {
        echo "Hello, world";
    }
}

Toro::serve(array(
    "/" => "HelloHandler",
));

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/301743/viewspace-741918/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-23

  • 博文量
    442
  • 访问量
    525344