* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2 * @author Icinga Development Team * */ // {{{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; /** * 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; } /** * Return a identifier to uniquely identify the request's source * * @return string */ public function getId() { $requestId = $this->getParam('request_id'); if ($requestId === null) { $requestId = substr('abcdefghijklmnopqrstuvwxyz', mt_rand(0, 25), 1) . substr(md5(time()), -7); } return $requestId; } }