dev-master
9999999-devThe Magtiny Framework API Manager
MIT
The Requires
- php >=7.0.0
- magtiny/magtiny-framework dev-master
by Clark Yanwei Zhao
magtiny
The Magtiny Framework API Manager
Author: Clark Yanwei Zhao zhaoyanwei@shinetechchina.com, (*1)
composer require magtiny/api-manager dev-master, (*2)
Magtiny API manager runs depending on controller file's comments., (*3)
Before every controller class, you should add some comments like this:, (*4)
/** * @magtiny APIManager * @controller index **/ class index {}
And before every controller action, you should add some comments like this:, (*5)
/** * @magtiny APIAction * @action required * @param getData.get I am get param * @param postData I am post param * @param requriedGetData.get.* I am required get param * @param requriedPostData.* I am required post param * @param jsonPostData.json {"data": "I am post json data"} * @method post **/ public function required () {}
To start api manager, you should use the following code:, (*6)
use magtiny\tool\apiManager; $config = [ "secret" => "xxxxxx", "instanceDir" => "controller dir name", "instanceUrl" => "api base url name", ]; $apiManager = new apiManager($config); return $apiManager->start();
magtiny-framework is MIT licensed., (*7)
The Magtiny Framework API Manager
MIT
magtiny