Added 2 more methods
authorRoland Häder <roland@mxchange.org>
Wed, 13 Feb 2013 01:33:58 +0000 (01:33 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 13 Feb 2013 01:33:58 +0000 (01:33 +0000)
inc/classes/interfaces/criteria/class_Criteria.php
inc/classes/main/criteria/class_BaseCriteria.php

index 86d9b36fd03ecb3179c4209d104f22dc7a735d16..737d5bc7a4af231f2cc07f68e79c88a93a48a6c0 100644 (file)
@@ -109,6 +109,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
         *
index 6a4511028b841be3baaa5238c38c21bac78d09c7..3b97b8b5f432d1b4fad74e23e9151d54671bf66b 100644 (file)
@@ -195,6 +195,28 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                return $value;
        }
 
+       /**
+        * 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
+        */
+       public function getCriteriaChoiceElemnent ($criteriaKey) {
+               // Call inner method
+               return $this->getCriteriaElemnent($criteriaKey, 'choice');
+       }
+
+       /**
+        * 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
+        */
+       public function getCriteriaExcludeElemnent ($criteriaKey) {
+               // Call inner method
+               return $this->getCriteriaElemnent($criteriaKey, 'exclude');
+       }
+
        /**
         * Checks whether given array entry matches
         *