+ * Getter for criteria array 'exclude' type
+ *
+ * @return $criteria
+ */
+ public final function getCriteriaExcludeArray () {
+ return $this->getCriteriaArray('exclude');
+ }
+
+ /**
+ * Unsets a criteria key from all criteria types
+ *
+ * @param $criteriaKey Criteria key to unset
+ * @return void
+ */
+ public final function unsetCriteria ($criteriaKey) {
+ // Make sure no 'my-' or 'my_' passes this point
+ assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE));
+
+ // Convert dashes to underscore
+ $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);
+
+ // "Walk" through all criterias
+ foreach ($this->getGenericArray('criteria') as $criteriaType => $dummy) {
+ // Remove it
+ $this->unsetGenericArrayElement('criteria', $criteriaType, $criteriaKey);
+ } // END - foreach
+ }
+
+ /**
+ * Add criteria, this method converts dashes to underscores because dashes
+ * are not valid for criteria keys.
+ *
+ * @param $criteriaKey Criteria key
+ * @param $criteriaValue Criteria value
+ * @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
+ * @return void
+ */
+ public final function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
+ // Make sure no 'my-' or 'my_' passes this point
+ assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
+
+ // Convert dashes to underscore
+ $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);
+
+ // Debug message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
+
+ // Append it
+ $this->appendStringToGenericArrayElement('criteria', $criteriaType, $criteriaKey, $criteriaValue);
+ }
+
+ /**
+ * Add "choice" criteria, this method converts dashes to underscores because
+ * dashes are not valid for criteria keys.
+ *
+ * @param $criteriaKey Criteria key
+ * @param $criteriaValue Criteria value
+ * @return void
+ */
+ public final function addChoiceCriteria ($criteriaKey, $criteriaValue) {
+ // Make sure no 'my-' or 'my_' passes this point
+ assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
+
+ // Debug message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
+
+ // Add it
+ $this->pushValueToGenericArrayElement('criteria', 'choice', $this->convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
+ }
+
+ /**
+ * Add "exclude" criteria, this method converts dashes to underscores because
+ * dashes are not valid for criteria keys.