private function matchVariableVars(array $routeUri)
    {
        $this->vars = [];
        foreach ($routeUri as $index => $route) {
            if (!in_array($route, ['?', $this->uri[$index]])) {
                $this->vars = [];
                return; // match failed - no exact match, no variable match
            }
            if ($route === '?') { // found a variable
                $this->vars[] = $this->uri[$index];
            }
        }
    }
private function matchVariableVars(array $routeUri)
    {
        $this->vars = [];
        foreach ($routeUri as $index => $route) {
            if (!in_array($route, ['?', $this->uri[$index]])) {
                $this->vars = [];
                return; // match failed - no exact match, no variable match
            }
            if ($route === '?') { // found a variable
                $this->vars[] = $this->uri[$index];
            }
        }
    }
private function matchVariableVars ( array $ routeUri ) { $ this -> vars = [ ] ; foreach ( $ routeUri as $ index => $ route ) { if ( ! in_array ( $ route , [ '?' , $ this -> uri [ $ index ] ] ) ) { $ this -> vars = [ ] ; return ; // match failed - no exact match, no variable match } if ( $ route === '?' ) { // found a variable $ this -> vars [ ] = $ this -> uri [ $ index ] ; } } }
Populate an ordered array of URI segment variables

@param array $routeUri
Populate an ordered array of URI segment variables