| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
12年前发布

Tonic : 开发RESTful风格Web应用的PHP微型框架

Toni是一个开源PHP微型框架,用于开发RESTful风格Web应用。

特性:

URI 注释
资源与URL的映射会是通过一个@uri注释实现
Content negotiation
Content and language negotiation support allowing you to easily pick the best representation for the client request.
Method conditions
Custom conditions can be added to methods via annotations allowing for conditional routing behaviour to be easily encapsulated.
Mount points
Mount namespaces of resources into any URL-space to make them portable.
示例:
01 <?php  02     03 /**  04  * @uri /hello  05  * @uri /hello/:name  06  */  07 class Hello extends Tonic\Resource {  08    09     /**  10      * @method GET  11      * @provides text/html  12      */  13     function sayHello($name = 'World') {  14         return 'Hello '.$name;  15     }  16 }

项目主页:http://www.open-open.com/lib/view/home/1349838249931

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1349838249931.html
RESTful PHP开发