protected function addParams(array $matches)
    {
        $params = [];
        foreach ($matches as $key => $value) {
            $value = $value[0];
            if (strpos($key, "params") === 0) {
                $params["parameters"] = array_merge(
                    $params["parameters"] ?? [],
                    explode("/", $value)
                );
            }

            if (strpos($key, "named") === 0) {
                $named = [];
                $key = "";
                foreach (explode("/", $value) as $param) {
                    if ($key === "") {
                        $key = $param;
                        $named[$key] = "";
                    } else {
                        $named[$key] = $param;
                        $key = "";
                    }
                }
                $params = array_merge($params, $named);
            }
        }

        $this->addQueryParams = $params;
    }
protected function addParams(array $matches)
    {
        $params = [];
        foreach ($matches as $key => $value) {
            $value = $value[0];
            if (strpos($key, "params") === 0) {
                $params["parameters"] = array_merge(
                    $params["parameters"] ?? [],
                    explode("/", $value)
                );
            }

            if (strpos($key, "named") === 0) {
                $named = [];
                $key = "";
                foreach (explode("/", $value) as $param) {
                    if ($key === "") {
                        $key = $param;
                        $named[$key] = "";
                    } else {
                        $named[$key] = $param;
                        $key = "";
                    }
                }
                $params = array_merge($params, $named);
            }
        }

        $this->addQueryParams = $params;
    }
protected function addParams ( array $ matches ) { $ params = [ ] ; foreach ( $ matches as $ key => $ value ) { $ value = $ value [ 0 ] ; if ( strpos ( $ key , "params" ) === 0 ) { $ params [ "parameters" ] = array_merge ( $ params [ "parameters" ] ?? [ ] , explode ( "/" , $ value ) ) ; } if ( strpos ( $ key , "named" ) === 0 ) { $ named = [ ] ; $ key = "" ; foreach ( explode ( "/" , $ value ) as $ param ) { if ( $ key === "" ) { $ key = $ param ; $ named [ $ key ] = "" ; } else { $ named [ $ key ] = $ param ; $ key = "" ; } } $ params = array_merge ( $ params , $ named ) ; } } $ this -> addQueryParams = $ params ; }
Add additional parameters

Prepares the found matches from the URI and injects them into the
'addQueryParams' property.

@param array $matches Regex matches
@return void
Add additional parameters