/** * Handles generic send of the payload */ public function handleSendJson($method) { // Prepare the request $args = $this->_mapJson($_POST, $_POST); // Showtime! $client = new \Lightbulb\Json\Rpc2\Client($this->endpoint); $client->_debug(); $return = $client->__call($method, $args); // Assign into the template $this->template->jsonRequest = \Lightbulb\Json\Rpc2\Client::formatJson($client->_getRequest()); $this->template->jsonResponse = \Lightbulb\Json\Rpc2\Client::formatJson($client->_getResponse()); $this->template->parsedResponse = $return; }