parent
ad8f16c185
commit
2332b94f0b
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
namespace Icinga\Web;
|
namespace Icinga\Web;
|
||||||
|
|
||||||
|
use Icinga\Application\Icinga;
|
||||||
use Zend_Controller_Request_Http;
|
use Zend_Controller_Request_Http;
|
||||||
use Icinga\User;
|
use Icinga\User;
|
||||||
|
|
||||||
|
@ -32,6 +33,13 @@ class Request extends Zend_Controller_Request_Http
|
||||||
*/
|
*/
|
||||||
protected $url;
|
protected $url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Response
|
||||||
|
*
|
||||||
|
* @var Response
|
||||||
|
*/
|
||||||
|
protected $response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get whether the request seems to be an API request
|
* Get whether the request seems to be an API request
|
||||||
*
|
*
|
||||||
|
@ -78,6 +86,20 @@ class Request extends Zend_Controller_Request_Http
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the response
|
||||||
|
*
|
||||||
|
* @return Response
|
||||||
|
*/
|
||||||
|
public function getResponse()
|
||||||
|
{
|
||||||
|
if ($this->response === null) {
|
||||||
|
$this->response = Icinga::app()->getResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes an ID unique to this request, to prevent id collisions in different containers
|
* Makes an ID unique to this request, to prevent id collisions in different containers
|
||||||
*
|
*
|
||||||
|
@ -96,4 +118,10 @@ class Request extends Zend_Controller_Request_Http
|
||||||
}
|
}
|
||||||
return $id . '-' . $this->uniqueId;
|
return $id . '-' . $this->uniqueId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasCookieSupport()
|
||||||
|
{
|
||||||
|
$cookie = new Cookie($this);
|
||||||
|
return $cookie->isSupported();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue