levkopo/apikit

This package is abandoned and no longer maintained. The author suggests using the ppeco/apipp package instead.

Kit for api backend

1.0.2 2021-06-12 07:54 UTC

This package is auto-updated.

Last update: 2021-07-07 18:01:21 UTC


README

Kit for api servers

WARNING! Repository migrated to https://github.com/PPEco/dbpp

Installation

composer require levkopo/apikit

Example

use levkopo\apikit\ApiKit;
ApiKit::create()
    ->method("hello_world", function(ApiKit $apiKit) {
        return "Hello, world!";
    })
    ->method("hwp", function(ApiKit $apiKit) {
        [$someKey] = $apiKit->params(["key"]);
        return "Key: $someKey";
    })
    ->start();