public function parseUrl()
{
$request = $this->getRequest();
$pathInfo = trim($request->getPathInfo(), '/');
if (($request->getUrlFormat() === THttpRequestUrlFormat::Path || $request->getUrlFormat() === THttpRequestUrlFormat::HiddenPath) && $pathInfo !== '') {
$separator = $request->getUrlParamSeparator();
$paths = explode('/', $pathInfo);
$getVariables = array();
foreach ($paths as $path) {
if (($path = trim($path)) !== '') {
if (($pos = strpos($path, $separator)) !== false) {
$name = substr($path, 0, $pos);
$value = substr($path, $pos + 1);
if (($pos = strpos($name, '[]')) !== false) {
$getVariables[substr($name, 0, $pos)][] = $value;
} else {
$getVariables[$name] = $value;
}
} else {
$getVariables[$path] = '';
}
}
}
return $getVariables;
} else {
return array();
}
}