| @@ 48-66 (lines=19) @@ | ||
| 45 | ||
| 46 | ||
| 47 | ||
| 48 | private function matchesArray($filterArray, $entryArray) |
|
| 49 | { |
|
| 50 | $isMatch = true; |
|
| 51 | foreach ($filterArray as $filterKey => $filterValue) { |
|
| 52 | ||
| 53 | // Check if the filter key exists and fetch corresponding value from entry |
|
| 54 | if (array_key_exists($filterKey, $entryArray)) { |
|
| 55 | $entryValue = $entryArray[$filterKey]; |
|
| 56 | } else { |
|
| 57 | $isMatch = false; |
|
| 58 | break; |
|
| 59 | } |
|
| 60 | ||
| 61 | // Check if the values match |
|
| 62 | $isMatch &= $this->matchesValue($filterValue, $entryValue); |
|
| 63 | } |
|
| 64 | ||
| 65 | return $isMatch; |
|
| 66 | } |
|
| 67 | ||
| 68 | ||
| 69 | ||
| @@ 48-66 (lines=19) @@ | ||
| 45 | ||
| 46 | ||
| 47 | ||
| 48 | private function matchesArray($filterArray, $entryArray) |
|
| 49 | { |
|
| 50 | $isMatch = true; |
|
| 51 | foreach ($filterArray as $filterKey => $filterValue) { |
|
| 52 | ||
| 53 | // Check if the filter key exists and fetch corresponding value from entry |
|
| 54 | if (array_key_exists($filterKey, $entryArray)) { |
|
| 55 | $entryValue = $entryArray[$filterKey]; |
|
| 56 | } else { |
|
| 57 | $isMatch = false; |
|
| 58 | break; |
|
| 59 | } |
|
| 60 | ||
| 61 | // Check if the values match |
|
| 62 | $isMatch &= $this->matchesValue($filterValue, $entryValue); |
|
| 63 | } |
|
| 64 | ||
| 65 | return $isMatch; |
|
| 66 | } |
|
| 67 | ||
| 68 | ||
| 69 | ||