@@ 70-92 (lines=23) @@ | ||
67 | ||
68 | ||
69 | ||
70 | private function matchesValue($filterValue, $entryValue) |
|
71 | { |
|
72 | $isMatch = false; |
|
73 | ||
74 | // If both are an array ... |
|
75 | if (is_array($filterValue) && is_array($entryValue)) { |
|
76 | $isMatch = $this->matchesArray($filterValue, $entryValue); |
|
77 | } |
|
78 | ||
79 | // If both aren't ... |
|
80 | if (!is_array($filterValue) && !is_array($entryValue)) { |
|
81 | $isMatch = $filterValue === $entryValue; |
|
82 | } |
|
83 | ||
84 | // If filter is an operator ... |
|
85 | $operatorManager = new OperatorManager(); |
|
86 | if ($operatorManager->isOperator($filterValue)) { |
|
87 | $operator = $operatorManager->createOperator($filterValue); |
|
88 | $isMatch = $operator->matches($entryValue); |
|
89 | } |
|
90 | ||
91 | return $isMatch; |
|
92 | } |
|
93 | } |
|
94 |
@@ 70-92 (lines=23) @@ | ||
67 | ||
68 | ||
69 | ||
70 | private function matchesValue($filterValue, $entryValue) |
|
71 | { |
|
72 | $isMatch = false; |
|
73 | ||
74 | // If both are an array ... |
|
75 | if (is_array($filterValue) && is_array($entryValue)) { |
|
76 | $isMatch = $this->matchesArray($filterValue, $entryValue); |
|
77 | } |
|
78 | ||
79 | // If both aren't ... |
|
80 | if (!is_array($filterValue) && !is_array($entryValue)) { |
|
81 | $isMatch = $filterValue === $entryValue; |
|
82 | } |
|
83 | ||
84 | // If filter is an operator ... |
|
85 | $operatorManager = new OperatorManager(); |
|
86 | if ($operatorManager->isOperator($filterValue)) { |
|
87 | $operator = $operatorManager->createOperator($filterValue); |
|
88 | $isMatch = $operator->matches($entryValue); |
|
89 | } |
|
90 | ||
91 | return $isMatch; |
|
92 | } |
|
93 | ||
94 | ||
95 |