コード例 #1
0
 /**
  * @inheritDoc
  */
 public function match(PsrRequest $request)
 {
     // Must inject routes prior to matching.
     $this->injectRoutes();
     $match = $this->zendRouter->match(Psr7ServerRequest::toZend($request, true));
     if (null === $match) {
         return RouteResult::fromRouteFailure();
     }
     return $this->marshalSuccessResultFromRouteMatch($match);
 }
コード例 #2
0
 /**
  * match(): defined by RouteInterface
  *
  * @see    RouteInterface::match()
  * @param  Request      $request
  * @param  integer|null $pathOffset
  * @param  array        $options
  * @return RouteMatch|null
  */
 public function match(Request $request, $pathOffset = null, array $options = [])
 {
     if ($this->hasTranslator() && $this->isTranslatorEnabled() && !isset($options['translator'])) {
         $options['translator'] = $this->getTranslator();
     }
     if (!isset($options['text_domain'])) {
         $options['text_domain'] = $this->getTranslatorTextDomain();
     }
     return parent::match($request, $pathOffset, $options);
 }