Route.php
public function match(string $pathToMatch, ...$argv): self
    {
        $this->storage = $argv;  // This is for home route function (singleton)

        $uri = $this->uri;

        $arrayToMatch = explode('/', trim($pathToMatch, '/'));

        $pathLength = \count($arrayToMatch);

        $pathLength === 0 and $pathToMatch = '*';   // shorthand if stmt

        // The order of the following
        if ($pathLength < $this->uriLength && substr($pathToMatch, -1) !== '*') {
            return $this;
        }

        $required = true;       // variables can be made optional by `?`
        $variables = array();

        for ($i = 0; $i <= $pathLength; $i++) {

            // set up our ending condition
            if ($pathLength === $i || $arrayToMatch[$i] === null) {
                $arrayToMatch[$i] = '*';
            }

            switch ($arrayToMatch[$i][0]) {
                case  '*':
                    $this->matched = true;
                    $referenceVariables = [];

                    foreach ($variables as $key => $value) {
                        $GLOBALS[$key] = $value;                    // this must be done in two lines
                        $referenceVariables[] = &$GLOBALS[$key];
                    }

                    // Variables captured in the path to match will passed to the closure
                    if (\is_callable($argv[0])) {
                        $this->addMethod('routeMatched', $argv[0]);
                        if (\call_user_func_array($this->methods['routeMatched'], $referenceVariables) === false) {
                            throw new PublicAlert('Bad Closure Passed to Route::match()');
                        }
                        return $this;
                    }

                    // If variables were captured in our path to match, they will be merged with our variable list provided with $argv
                    if (\is_callable($this->closure)) {
                        $argv[] = &$referenceVariables;
                        $this->addMethod('routeMatched', $this->closure);
                        \call_user_func_array($this->methods['routeMatched'], $argv);
                        return $this;
                    }
                    return $this;

                case '{': // this is going to indicate the start of a variable name

                    if (substr($arrayToMatch[$i], -1) !== '}') {
                        throw new PublicAlert('Variable declaration must be rapped in brackets. ie `/{var}/`');
                    }

                    $variable = rtrim(ltrim($arrayToMatch[$i], '{'), '}');

                    if (substr($variable, -1) === '?' && $variable = rtrim($variable, '?')) {
                        $required = false;
                    }

                    if (empty($variable)) {
                        throw new PublicAlert('Variable must have a name association. ie  `/{var}/`');
                    }

                    $value = null;

                    if (array_key_exists($i, $uri)) {
                        $value = $uri[$i];
                    }
                    if ($required === true && $value === null) {
                        return $this;
                    }
                    $variables[$variable] = $value;
                    break;
                default:
                    if (!array_key_exists($i, $uri)) {
                        return $this;
                    }
                    if (strtolower($arrayToMatch[$i]) !== strtolower($uri[$i])) {
                        return $this;
                    }
            }
        }
        return $this;
    }
public function match(string $pathToMatch, ...$argv): self
    {
        $this->storage = $argv;  // This is for home route function (singleton)

        $uri = $this->uri;

        $arrayToMatch = explode('/', trim($pathToMatch, '/'));

        $pathLength = \count($arrayToMatch);

        $pathLength === 0 and $pathToMatch = '*';   // shorthand if stmt

        // The order of the following
        if ($pathLength < $this->uriLength && substr($pathToMatch, -1) !== '*') {
            return $this;
        }

        $required = true;       // variables can be made optional by `?`
        $variables = array();

        for ($i = 0; $i <= $pathLength; $i++) {

            // set up our ending condition
            if ($pathLength === $i || $arrayToMatch[$i] === null) {
                $arrayToMatch[$i] = '*';
            }

            switch ($arrayToMatch[$i][0]) {
                case  '*':
                    $this->matched = true;
                    $referenceVariables = [];

                    foreach ($variables as $key => $value) {
                        $GLOBALS[$key] = $value;                    // this must be done in two lines
                        $referenceVariables[] = &$GLOBALS[$key];
                    }

                    // Variables captured in the path to match will passed to the closure
                    if (\is_callable($argv[0])) {
                        $this->addMethod('routeMatched', $argv[0]);
                        if (\call_user_func_array($this->methods['routeMatched'], $referenceVariables) === false) {
                            throw new PublicAlert('Bad Closure Passed to Route::match()');
                        }
                        return $this;
                    }

                    // If variables were captured in our path to match, they will be merged with our variable list provided with $argv
                    if (\is_callable($this->closure)) {
                        $argv[] = &$referenceVariables;
                        $this->addMethod('routeMatched', $this->closure);
                        \call_user_func_array($this->methods['routeMatched'], $argv);
                        return $this;
                    }
                    return $this;

                case '{': // this is going to indicate the start of a variable name

                    if (substr($arrayToMatch[$i], -1) !== '}') {
                        throw new PublicAlert('Variable declaration must be rapped in brackets. ie `/{var}/`');
                    }

                    $variable = rtrim(ltrim($arrayToMatch[$i], '{'), '}');

                    if (substr($variable, -1) === '?' && $variable = rtrim($variable, '?')) {
                        $required = false;
                    }

                    if (empty($variable)) {
                        throw new PublicAlert('Variable must have a name association. ie  `/{var}/`');
                    }

                    $value = null;

                    if (array_key_exists($i, $uri)) {
                        $value = $uri[$i];
                    }
                    if ($required === true && $value === null) {
                        return $this;
                    }
                    $variables[$variable] = $value;
                    break;
                default:
                    if (!array_key_exists($i, $uri)) {
                        return $this;
                    }
                    if (strtolower($arrayToMatch[$i]) !== strtolower($uri[$i])) {
                        return $this;
                    }
            }
        }
        return $this;
    }
// TODO - comment this
@param string $pathToMatch
@param array ...$argv
@return Route
@throws PublicAlert