sectoroverload2k/rest-router
最新稳定版本:1.1.4
Composer 安装命令:
composer require sectoroverload2k/rest-router
包简介
PHP Library for REST API
README 文档
README
This code provides the basic framework for a PHP developer that wants to build a REST service. Some of the features provided in this framework are:
- API Authentication
- Multiple request methods
- GET
- POST
- PUT
- DELETE
- Custom URL routing to support variables
Controller Versions, Classes and Actions
/controllers/version/controller/action Example Request: GET /v1/home/index
- Default version is v1
- Default controller class is home
- Default action is index
##The REST Router will do the following:
- try to find a folder called v1 in the /controllers folder.
- Load home controller in file /controllers/v1/home.php
- Because this is a GET request, it will try to following:
- check for a class method called get_index and run it
- if not found, it will search for index and run it
- if not found, it will return an error
Request Methods
- GET
- POST
- PUT
- DELETE
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-11