コード例 #1
0
ファイル: Regex.php プロジェクト: andals/vine
 /**
  * {@inheritdoc}
  */
 public function match(\Vine\Component\Http\RequestInterface $request, \Vine\Component\Routing\Route\RouteInterface $route)
 {
     /*{{{*/
     if (!preg_match($this->regex, $request->getUrlPath(), $matches)) {
         return false;
     }
     array_shift($matches);
     $route->setActionArgs($matches);
     return true;
 }
コード例 #2
0
ファイル: Regex.php プロジェクト: NichoZhang/vine
 /**
  * {@inheritdoc}
  */
 public function match(\Vine\Component\Http\RequestInterface $request, &$actionArgs = array())
 {
     /*{{{*/
     if (!preg_match($this->regex, $request->getUrlPath(), $matches)) {
         return false;
     }
     array_shift($matches);
     $actionArgs = $matches;
     return true;
 }
コード例 #3
0
ファイル: Prefix.php プロジェクト: andals/vine
 /**
  * {@inheritdoc}
  */
 public function match(\Vine\Component\Http\RequestInterface $request, \Vine\Component\Routing\Route\RouteInterface $route)
 {
     /*{{{*/
     return strpos($request->getUrlPath(), $this->prefix) !== false ? true : false;
 }
コード例 #4
0
ファイル: Prefix.php プロジェクト: NichoZhang/vine
 /**
  * {@inheritdoc}
  */
 public function match(\Vine\Component\Http\RequestInterface $request, &$actionArgs = array())
 {
     /*{{{*/
     return strpos($request->getUrlPath(), $this->prefix) !== false ? true : false;
 }