Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (11 sloc) 422 Bytes
<?php
require_once '../../vendor/autoload.php';
use Datto\JsonRpc;
use Datto\JsonRpc\Simple;
use Datto\JsonRpc\Validator;
$mapper = new Simple\Mapper('Demo\\Api\\Endpoint\\');
$evaluator = new Validator\Evaluator(new Simple\Evaluator($mapper), $mapper);
$server = new JsonRpc\Server($evaluator);
header('Content-Type: application/json');
$message = file_get_contents('php://input');
echo $server->reply($message);