match() public method

If matched, set the matches in the route
public match ( array $params ) : array | null
$params array
return array | null
Example #1
0
 public function testGetMatchedParamReturnsDefaultValueIfParameterIsNotMatched()
 {
     $route = new Route('foo', 'foo [<bar>]');
     $matches = $route->match(['foo']);
     $this->assertNull($route->getMatchedParam('bar'));
 }