public final function getSkip () {
return $this->skip;
}
+
+ /**
+ * Checks whether the given key/value pair is matching with 'default' and one of 'choice' and
+ * never with in 'exclude'.
+ *
+ * @param $key Key element to check
+ * @param $value Value to check
+ * @return $isMatching Whether the key/value is matching or excluded
+ */
+ public function isCriteriaMatching ($key, $value) {
+ // Get 'default' search value
+ $search = $this->getCriteriaElemnent($key);
+
+ // 'default' check
+ $isMatching = ((!is_null($search)) && ($search == $value));
+
+ // Get 'choice' search value (can be NULL or comma-separated string)
+ $search = $this->getCriteriaChoiceElemnent($key);
+
+ // 'choice' check
+ $isMatching = (($isMatching === TRUE) && ((is_null($search)) || (in_array($value, explode(',', $search)))));
+
+ // Get 'exclude' search value
+ $search = $this->getCriteriaExcludeElemnent($key);
+
+ // 'exclude' check
+ $isMatching = (($isMatching === TRUE) && ((is_null($search)) || ($search != $value)));
+
+ // Return result
+ return $isMatching;
+ }
}
// [EOF]