/**
  * Renders/Echoes the ajax output
  *
  * @param ServerRequestInterface $request
  * @param ResponseInterface $response
  * @return ResponseInterface|NULL
  * @throws \InvalidArgumentException
  */
 public function processRequest(ServerRequestInterface $request, ResponseInterface $response)
 {
     $action = isset($request->getParsedBody()['action']) ? $request->getParsedBody()['action'] : (isset($request->getQueryParams()['action']) ? $request->getQueryParams()['action'] : '');
     if (!in_array($action, array('route', 'getAPI'), true)) {
         return null;
     }
     $this->routeAction($action);
     return $this->ajaxObject->render();
 }
 /**
  * Renders/Echoes the ajax output
  *
  * @return void
  */
 public function render()
 {
     $this->ajaxObject->render();
 }