<?php namespace App\Filters;

use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Filters\FilterInterface;

/*********************************************
*        针对接口访问的过滤器
*********************************************/
class LoginFilter implements FilterInterface
{
    public function before(RequestInterface $request)
    {
        $param = $request->getJSON();
    }

    //--------------------------------------------------------------------

    public function after(RequestInterface $request, ResponseInterface $response)
    {
        // Do something here
    }
}