public function isAjaxRequest()
    {
        return
            false !== strpos(
                strtolower(ServerRequestFactory::getHeader('x-requested-with', $this->getRequest()->getHeaders(), '')),
                'xmlhttprequest'
            ) && $this->isHttpRequest();
    }
public function isAjaxRequest()
    {
        return
            false !== strpos(
                strtolower(ServerRequestFactory::getHeader('x-requested-with', $this->getRequest()->getHeaders(), '')),
                'xmlhttprequest'
            ) && $this->isHttpRequest();
    }
public function isAjaxRequest ( ) { return false !== strpos ( strtolower ( ServerRequestFactory :: getHeader ( 'x-requested-with' , $ this -> getRequest ( ) -> getHeaders ( ) , '' ) ) , 'xmlhttprequest' ) && $ this -> isHttpRequest ( ) ; }
Check if request is a ajax request

@return bool
Check if request is a ajax request