X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Finterfaces%2Fcriteria%2Fclass_Criteria.php;h=6f515ec9ea5c27ff4c668c23a63360b45e57804c;hp=737d5bc7a4af231f2cc07f68e79c88a93a48a6c0;hb=1c379903c466fba5770c5f38b348915cee0f5854;hpb=2edd3d5900a47fde3352bd0d9abb326cade293b8 diff --git a/inc/classes/interfaces/criteria/class_Criteria.php b/inc/classes/interfaces/criteria/class_Criteria.php index 737d5bc7..6f515ec9 100644 --- a/inc/classes/interfaces/criteria/class_Criteria.php +++ b/inc/classes/interfaces/criteria/class_Criteria.php @@ -37,6 +37,31 @@ interface Criteria extends FrameworkInterface { */ function getWrapperConfigEntry (); + /** + * Checks whether given key is set + * + * @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude' + * @param $criteriaKey Criteria key + * @return $isSet Whether key is set + */ + function isKeySet ($criteriaType, $criteriaKey); + + /** + * Checks whether given key is set for 'choice' type + * + * @param $criteriaKey Criteria key + * @return $isSet Whether key is set + */ + function isChoiceKeySet ($criteriaKey); + + /** + * Checks whether given key is set for 'exclude' type + * + * @param $criteriaKey Criteria key + * @return $isSet Whether key is set + */ + function isExcludeKeySet ($criteriaKey); + /** * Getter for criteria array * @@ -59,6 +84,14 @@ interface Criteria extends FrameworkInterface { */ function getCriteriaExcludeArray (); + /** + * Unsets a criteria key from all criteria types + * + * @param $criteriaKey Criteria key to unset + * @return void + */ + function unsetCriteria ($criteriaKey); + /** * Add criteria, this method converts dashes to underscores because dashes * are not valid for criteria keys. @@ -101,27 +134,27 @@ interface Criteria extends FrameworkInterface { function addConfiguredCriteria ($criteriaKey, $configEntry, $criteriaType = 'default'); /** - * Get criteria element or null if not found + * Get criteria element or FALSE if not found * * @param $criteriaKey The requested criteria key * @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude' - * @return $value Whether the value of the critera or null + * @return $value Whether the value of the critera or FALSE */ function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default'); /** - * Get criteria element or null if not found for 'choice' type + * Get criteria element or FALSE if not found for 'choice' type * * @param $criteriaKey The requested criteria key - * @return $value Whether the value of the critera or null + * @return $value Whether the value of the critera or FALSE */ function getCriteriaChoiceElemnent ($criteriaKey); /** - * Get criteria element or null if not found for 'exclude' type + * Get criteria element or FALSE if not found for 'exclude' type * * @param $criteriaKey The requested criteria key - * @return $value Whether the value of the critera or null + * @return $value Whether the value of the critera or FALSE */ function getCriteriaExcludeElemnent ($criteriaKey);