# phpboot **Repository Path**: yesgooo/phpboot ## Basic Information - **Project Name**: phpboot - **Description**: No description available - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-10-25 - **Last Updated**: 2025-01-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PhpBoot [](https://raw.githubusercontent.com/caoym/phpboot/master/LICENSE) [](https://packagist.org/packages/caoym/phpboot) [](http://phpboot.readthedocs.io/zh/latest/?badge=latest) [](https://travis-ci.org/caoym/phpboot) [](https://scrutinizer-ci.com/g/caoym/phpboot/?branch=master) [](https://scrutinizer-ci.com/g/caoym/phpboot/?branch=master) > phprs-restful 2.x is renamed to PhpBoot, and incompatible with 1.x. You can get the old version from [phprs-restful v1.x](https://github.com/caoym/phprs-restful/tree/v1.2.4) [查看中文说明](https://github.com/caoym/phpboot/blob/master/README.zh.md) **[PhpBoot](https://github.com/caoym/phpboot)** is an easy and powerful PHP framework for building RESTful/Microservices APIs. ## Specialities PhpBoot provides mainstream features, such as IOC, HOOK, ORM, Validation, etc. But the most striking features are: ### 1. Designing object-oriented APIs **WITHOUT** PhpBoot: ```PHP class BookController { public function findBooks(Request $request) { $name = $request->get('name'); $offset = $request->get('offset', 0); $limit = $request->get('limit', 10); ... return new Response(['total'=>$total, 'data'=>$books]); } public function createBook(Request $request) ... } ``` **WITH** PhpBoot: ```PHP /** * @path /books/ */ class Books { /** * @route GET / * @return Book[] */ public function findBooks($name, &$total=null, $offset=0, $limit=10) { $total = ... ... return $books; } /** * @route POST / * @param Book $book {@bind request.request} bind $book with http body * @return string id of created book */ public function createBook(Book $book) { $id = ... return $id; } } ``` Read more: [phpboot-example](https://github.com/caoym/phpboot-example)。 ### 2. Swagger PhpBoot can automatically generate Swagger JSON,which can be rendered as document by Swagger UI like this: