示例#1
0
            {
                "label": "created",
                "field": "TtSampleDatum.created"
            },
            {
                "label": "modified",
                "field": "TtSampleDatum.modified"
            }
        ],
        "query" : "SELECT * FROM tt_sample_data"
    }
}';
//$_POST['body'] = $json;
//$_POST['method'] = 'deleteReport';
$Handler = new Handler();
$Handler->setPost($_POST);
$Handler->handle();
class Handler
{
    public function handle()
    {
        header('Content-Type: application/json');
        print_r($this->response);
    }
    public function setPost($post)
    {
        $this->method = $post['method'];
        $this->body = $post['body'];
        $this->client = new Client();
        switch ($this->method) {
            case 'createReport':