src/Processes/Router.php
protected static function dynamic($route)
    {
        $parms = [];
        $param = '';
        $open = false;
        //
        for ($i = 0; $i < Strings::length($route); $i++) {
            if ($open && $route[$i] != '}') {
                $param .= $route[$i];
            }
            //
            if ($route[$i] == '{' && !$open) {
                $open = true;
            } //
            elseif ($route[$i] == '}' && $open) {
                $open = !true;
                $parms[] = $param;
                $param = '';
            }
        }
        //
        return $parms;
    }
protected static function dynamic($route)
    {
        $parms = [];
        $param = '';
        $open = false;
        //
        for ($i = 0; $i < Strings::length($route); $i++) {
            if ($open && $route[$i] != '}') {
                $param .= $route[$i];
            }
            //
            if ($route[$i] == '{' && !$open) {
                $open = true;
            } //
            elseif ($route[$i] == '}' && $open) {
                $open = !true;
                $parms[] = $param;
                $param = '';
            }
        }
        //
        return $parms;
    }
protected static function dynamic ( $ route ) { $ parms = [ ] ; $ param = '' ; $ open = false ; // for ( $ i = 0 ; $ i < Strings :: length ( $ route ) ; $ i ++ ) { if ( $ open && $ route [ $ i ] != '}' ) { $ param .= $ route [ $ i ] ; } // if ( $ route [ $ i ] == '{' && ! $ open ) { $ open = true ; } // elseif ( $ route [ $ i ] == '}' && $ open ) { $ open = ! true ; $ parms [ ] = $ param ; $ param = '' ; } } // return $ parms ; }
Get the dynamic paramteres from route string.
Get the dynamic paramteres from route string .