2013-07-26 15:58:16 +02:00
|
|
|
<?php
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
|
|
|
|
namespace Icinga\Web;
|
|
|
|
|
|
|
|
use Zend_Controller_Request_Http;
|
|
|
|
use Icinga\User;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Request to handle special attributes
|
|
|
|
*/
|
|
|
|
class Request extends Zend_Controller_Request_Http
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* User object
|
|
|
|
*
|
|
|
|
* @var User
|
|
|
|
*/
|
|
|
|
private $user;
|
|
|
|
|
2014-11-15 22:40:29 +01:00
|
|
|
private $url;
|
|
|
|
|
|
|
|
public function getUrl()
|
|
|
|
{
|
|
|
|
if ($this->url === null) {
|
|
|
|
$this->url = Url::fromRequest($this);
|
|
|
|
}
|
|
|
|
return $this->url;
|
|
|
|
}
|
|
|
|
|
2013-07-26 15:58:16 +02:00
|
|
|
/**
|
|
|
|
* Setter for user
|
|
|
|
*
|
|
|
|
* @param User $user
|
|
|
|
*/
|
|
|
|
public function setUser(User $user)
|
|
|
|
{
|
|
|
|
$this->user = $user;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Getter for user
|
|
|
|
*
|
|
|
|
* @return User
|
|
|
|
*/
|
|
|
|
public function getUser()
|
|
|
|
{
|
|
|
|
return $this->user;
|
|
|
|
}
|
|
|
|
}
|