Conditions | 7 |
Paths | 7 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function isMatching($url, $getParamArray) |
||
32 | { |
||
33 | if ($this->getRuleType() == self::TYPE_REGEX) { |
||
34 | if (!empty($this->getValue())) { |
||
35 | return preg_match("/" . $this->getValue() . "/", $url) === 1; |
||
36 | } |
||
37 | } elseif ($this->getRuleType() == self::TYPE_GET_PARAMS) { |
||
38 | if ($this->getRewriteUrlParamCollection()->count() > 0) { |
||
39 | foreach ($this->getRewriteUrlParamCollection() as $rewriteUrlParam) { |
||
40 | if (!$rewriteUrlParam->isMatching($getParamArray)) { |
||
41 | return false; |
||
42 | } |
||
43 | } |
||
44 | return true; |
||
45 | } |
||
46 | } |
||
47 | return false; |
||
48 | } |
||
49 | |||
55 |