Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 final class RouterStaticRule extends RouterBaseRule
00013 {
00014 protected $route = null;
00015
00019 public static function create($route)
00020 {
00021 return new self($route);
00022 }
00023
00024 public function __construct($route)
00025 {
00026
00027 $this->route = trim($route, '/');
00028 }
00029
00030 public function match(HttpRequest $request)
00031 {
00032 $path = $this->processPath($request)->toString();
00033
00034
00035 if (trim(urldecode($path), '/') == $this->route)
00036 return $this->defaults;
00037
00038 return false;
00039 }
00040
00041 public function assembly(
00042 array $data = array(),
00043 $reset = false,
00044 $encode = false
00045 )
00046 {
00047 return $this->route;
00048 }
00049 }
00050 ?>