| Conditions | 7 |
| Paths | 7 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 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 |