Example #1
0
 /**
  * Matches a \F3\FLOW3\MVC\RequestInterface against its set URL pattern rules
  *
  * @param \F3\FLOW3\MVC\RequestInterface $request The request that should be matched
  * @return boolean TRUE if the pattern matched, FALSE otherwise
  * @throws \F3\FLOW3\Security\Exception\RequestTypeNotSupportedException
  * @author Andreas Förthner <*****@*****.**>
  */
 public function matchRequest(\F3\FLOW3\MVC\RequestInterface $request)
 {
     if (!$request instanceof \F3\FLOW3\MVC\Web\Request) {
         throw new \F3\FLOW3\Security\Exception\RequestTypeNotSupportedException('The given request type is not supported.', 1216903641);
     }
     return (bool) preg_match('/^' . str_replace('/', '\\/', $this->uriPattern) . '$/', $request->getRequestUri()->getPath());
 }