matchRequest() 공개 메소드

Matches a \Neos\Flow\Mvc\RequestInterface against its set host pattern rules
public matchRequest ( Neos\Flow\Mvc\RequestInterface $request ) : boolean
$request Neos\Flow\Mvc\RequestInterface The request that should be matched
리턴 boolean TRUE if the pattern matched, FALSE otherwise
예제 #1
0
 /**
  * @dataProvider uriAndHostPatterns
  * @test
  */
 public function requestMatchingBasicallyWorks($uri, $pattern, $expected, $message)
 {
     $request = Request::create(new Uri($uri))->createActionRequest();
     $requestPattern = new Host(['hostPattern' => $pattern]);
     $this->assertEquals($expected, $requestPattern->matchRequest($request), $message);
 }