public function init() { $this->request = Instance::ensure($this->request, Request::className()); if (is_array($this->response)) { $this->response['request'] = $this->request; $this->response = Instance::ensure($this->response, '\\rock\\response\\Response', [], false); } else { $this->response = Instance::ensure($this->response, '\\rock\\response\\Response', [], false); if ($this->response instanceof Response) { $this->response->request = $this->request; } } $this->cache = Instance::ensure($this->cache, null, [], false); $this->data = parse_url($this->request->getAbsoluteUrl()); $this->RESTHandlers = array_merge($this->defaultRESTHandlers(), $this->RESTHandlers); }
protected function calculateData() { $this->data = parse_url($this->request->getAbsoluteUrl()); }
/** * Returns current url. * @return string * @throws \Exception */ protected function currentInternal() { return $this->current ? Alias::getAlias($this->current) : $this->request->getAbsoluteUrl(); }