protected function isXmlHttpRequest()
    {
        $serverParams = $this->getPsrRequest()->getServerParams();
        if(isset($serverParams['HTTP_X_REQUESTED_WITH'])){
            if(strtolower($serverParams['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
                return true;
            }
        }
        return false;
    }