private function parsePath($parsedUrl) { if (!isset($parsedUrl['path'])) { return; } $relativeParts = explode('/', trim($parsedUrl['path'], '/')); foreach ($relativeParts as $part) { if (strlen(trim($part))) { $this->url->addPath(trim($part)); } } }
protected function parseAction() { $lastPath = $this->url->getLastPath(); $pos = strrpos($lastPath, '_'); if (false !== $pos) { $this->action->setActionCode(substr($lastPath, $pos + 1, $this->actionLength)); $this->action->setValue(substr($lastPath, $pos + 1 + $this->actionLength)); $lastPath = substr($lastPath, 0, $pos); } else { $this->action->setActionCode($lastPath); return; } $pos = strpos($lastPath, '_'); if (false !== $pos) { $params = substr($lastPath, $pos + 1); foreach (explode('_', $params) as $param) { $this->action->setParam(substr($param, 0, 1), substr($param, 1)); } $lastPath = substr($lastPath, 0, $pos); } $this->action->setKeyword($lastPath); }