29 $this->httpMethod = $httpMethod;
31 $this->regex = $regex;
32 $this->variables = $variables;
44 $regex =
'~^' . $this->regex .
'$~';
45 return (
bool) preg_match($regex, $str);
An exception for terminatinating execution or to throw for unit testing.
__construct($httpMethod, $handler, $regex, $variables)
Constructs a route (value object).
matches($str)
Tests whether this route matches the given string.