]> git.mxchange.org Git - core.git/blobdiff - inc/classes/interfaces/criteria/class_Criteria.php
Rewrote search criteria matching:
[core.git] / inc / classes / interfaces / criteria / class_Criteria.php
index 0859ed0d065863990a9efcb030f0ecbb1fb5dede..0a1264ccc9f8d33f2c39a52f3b95eeb6394980fd 100644 (file)
@@ -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
         *
@@ -109,6 +134,22 @@ interface Criteria extends FrameworkInterface {
         */
        function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default');
 
+       /**
+        * Get criteria element or null if not found for 'choice' type
+        *
+        * @param       $criteriaKey    The requested criteria key
+        * @return      $value                  Whether the value of the critera or null
+        */
+       function getCriteriaChoiceElemnent ($criteriaKey);
+
+       /**
+        * Get criteria element or null if not found for 'exclude' type
+        *
+        * @param       $criteriaKey    The requested criteria key
+        * @return      $value                  Whether the value of the critera or null
+        */
+       function getCriteriaExcludeElemnent ($criteriaKey);
+
        /**
         * Checks whether given array entry matches
         *
@@ -159,14 +200,6 @@ interface Criteria extends FrameworkInterface {
         */
        function getCacheKeyExclude ($onlyKeys = array());
 
-       /**
-        * "Getter" for a cache key ('choice' type)
-        *
-        * @param       $onlyKeys       Only use these keys for a cache key
-        * @return      $cacheKey       The key suitable for the cache system
-        */
-       function getCacheKeyChoice ($onlyKeys = array());
-
        /**
         * Count the criteria, e.g. useful to find out if a database query has no
         * limitation (search criteria).