aboutsummaryrefslogtreecommitdiff
path: root/src/Handlers/JsonAPIHandler.php
blob: cc6aa610cc87c5f91833afc8b038d97c5e2fa2c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php


namespace Micropoly\Handlers;


use Micropoly\Env;
use Micropoly\Handler;

abstract class JsonAPIHandler implements Handler
{
    abstract protected function handleAPIRequest(Env $env, array $variables): JsonAPIResult;

    public function handle(Env $env, array $variables)
    {
        $this->handleAPIRequest($env, $variables)->send();
    }
}