src/bitExpert/Pathfinder/RouteBuilder.php
public function ifMatches(string $param, callable $matcher) : RouteBuilder
    {
        if (!array_key_exists($param, $this->matchers)) {
            $this->matchers[$param] = [];
        }

        $this->matchers[$param][] = $matcher;

        return $this;
    }
public function ifMatches(string $param, callable $matcher) : RouteBuilder
    {
        if (!array_key_exists($param, $this->matchers)) {
            $this->matchers[$param] = [];
        }

        $this->matchers[$param][] = $matcher;

        return $this;
    }
Sets matcher(s) which the given param should match
for the route to be active.

@param string $param The param name to set the matcher(s) for
@param callable $matcher The matcher or array of matchers for the param
@return RouteBuilder
@throws \InvalidArgumentException