$query =
[];
$params =
[];
foreach (explode($this->separator,
$path) as $i =>
$routePart) { $routePart =
urldecode($routePart);
if ($i === 0 &&
empty($query[$context->
getModuleKey()]) &&
$this->dispatcher->
isValidModule($routePart)) { $query[$context->
getModuleKey()] =
$routePart;
} elseif (empty($query[$context->
getControllerKey()])) { $query[$context->
getControllerKey()] =
$routePart;
} elseif (empty($query[$context->
getActionKey()])) { $query[$context->
getActionKey()] =
$routePart;
} else { $params[] =
$routePart;
} } if ($params) { $chunks =
array_chunk($params, 2, false
);
foreach ($chunks as $chunk) { if (isset($chunk[1
])) { // check if the parameter is a valid array or just a simple value