2017 © Pedro Peláez
 

package api-manager

The Magtiny Framework API Manager

image

magtiny/api-manager

The Magtiny Framework API Manager

  • Saturday, April 21, 2018
  • by Clarkruinisy
  • Repository
  • 0 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

magtiny-api-manager

Author: Clark Yanwei Zhao zhaoyanwei@shinetechchina.com, (*1)

Get started

composer require magtiny/api-manager dev-master, (*2)

Comment

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();

License

magtiny-framework is MIT licensed., (*7)

The Versions

21/04 2018

dev-master

9999999-dev

The Magtiny Framework API Manager

  Sources   Download

MIT

The Requires

 

by Clark Yanwei Zhao

magtiny