public static function match($check, $url = null)
{
if (is_null($url)) {
$url = self::here();
}
$check = '%^' . str_replace(array(':any', ':fragment', ':num'), array('(.+)', '([^\\/]+)', '([0-9]+)'), $check) . '/?$%';
return preg_match($check, $url);
}
public function get(array $hashMap, $isNestedKeysName = false) { $pattern = $this->getPattern($isNestedKeysName); $this->mapper->match($pattern, [$hashMap]); $data = $this->mapper->current(); if (empty($data)) { $result = $this->getEmptyArray($pattern); } else { $result = $this->arrayHelper->toTuple($data, $pattern); } return $result; }