]> git.mxchange.org Git - core.git/blobdiff - framework/main/interfaces/criteria/class_Criteria.php
Continued:
[core.git] / framework / main / interfaces / criteria / class_Criteria.php
index 30fb3ab5de9b1433bf274ac4a47c4cb681e8a190..964d639411b112b6fa9f5693a61d16f8bdab337f 100644 (file)
@@ -34,7 +34,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $wrapperConfigEntry             Configuration entry which hold the wrapper class' name
         * @return      void
         */
-       function setWrapperConfigEntry ($wrapperConfigEntry);
+       function setWrapperConfigEntry (string $wrapperConfigEntry);
 
        /**
         * Getter for wrapper class name
@@ -50,7 +50,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaKey    Criteria key
         * @return      $isSet                  Whether key is set
         */
-       function isKeySet ($criteriaType, $criteriaKey);
+       function isKeySet (string $criteriaType, string $criteriaKey);
 
        /**
         * Checks whether given key is set for 'choice' type
@@ -58,7 +58,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaKey    Criteria key
         * @return      $isSet                  Whether key is set
         */
-       function isChoiceKeySet ($criteriaKey);
+       function isChoiceKeySet (string $criteriaKey);
 
        /**
         * Checks whether given key is set for 'exclude' type
@@ -66,7 +66,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaKey    Criteria key
         * @return      $isSet                  Whether key is set
         */
-       function isExcludeKeySet ($criteriaKey);
+       function isExcludeKeySet (string $criteriaKey);
 
        /**
         * Getter for criteria array
@@ -74,7 +74,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaType   Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
         * @return      $criteria
         */
-       function getCriteriaArray ($criteriaType = 'default');
+       function getCriteriaArray (string $criteriaType = 'default');
 
        /**
         * Getter for criteria array 'choice' type
@@ -96,7 +96,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaKey    Criteria key to unset
         * @return      void
         */
-       function unsetCriteria ($criteriaKey);
+       function unsetCriteria (string $criteriaKey);
 
        /**
         * Add criteria, this method converts dashes to underscores because dashes
@@ -107,7 +107,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaType   Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
         * @return      void
         */
-       function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default');
+       function addCriteria (string $criteriaKey, $criteriaValue, string $criteriaType = 'default');
 
        /**
         * Sets criteria, this method converts dashes to underscores because dashes
@@ -118,7 +118,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaType   Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
         * @return      void
         */
-       function setCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default');
+       function setCriteria (string $criteriaKey, $criteriaValue, string $criteriaType = 'default');
 
        /**
         * Add "choice" criteria, this method converts dashes to underscores because
@@ -128,7 +128,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaValue  Criteria value
         * @return      void
         */
-       function addChoiceCriteria ($criteriaKey, $criteriaValue);
+       function addChoiceCriteria (string $criteriaKey, $criteriaValue);
 
        /**
         * Add "exclude" criteria, this method converts dashes to underscores because
@@ -138,7 +138,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaValue  Criteria value
         * @return      void
         */
-       function addExcludeCriteria ($criteriaKey, $criteriaValue);
+       function addExcludeCriteria (string $criteriaKey, $criteriaValue);
 
        /**
         * Add configured criteria
@@ -148,7 +148,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaType   Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
         * @return      void
         */
-       function addConfiguredCriteria ($criteriaKey, $configEntry, $criteriaType = 'default');
+       function addConfiguredCriteria (string $criteriaKey, string $configEntry, string $criteriaType = 'default');
 
        /**
         * Get criteria element or false if not found
@@ -157,7 +157,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaType   Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
         * @return      $value                  Whether the value of the critera or false
         */
-       function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default');
+       function getCriteriaElemnent (string $criteriaKey, string $criteriaType = 'default');
 
        /**
         * Get criteria element or false if not found for 'choice' type
@@ -165,7 +165,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaKey    The requested criteria key
         * @return      $value                  Whether the value of the critera or false
         */
-       function getCriteriaChoiceElemnent ($criteriaKey);
+       function getCriteriaChoiceElemnent (string $criteriaKey);
 
        /**
         * Get criteria element or false if not found for 'exclude' type
@@ -173,7 +173,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaKey    The requested criteria key
         * @return      $value                  Whether the value of the critera or false
         */
-       function getCriteriaExcludeElemnent ($criteriaKey);
+       function getCriteriaExcludeElemnent (string $criteriaKey);
 
        /**
         * Checks whether given array entry matches
@@ -182,7 +182,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaType   Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
         * @return      $matches                Whether the entry matches or not
         */
-       function ifEntryMatches (array $entryArray, $criteriaType = 'default');
+       function ifEntryMatches (array $entryArray, string $criteriaType = 'default');
 
        /**
         * Checks whether given array 'choice' entry matches
@@ -207,7 +207,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $criteriaType   Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
         * @return      $cacheKey       The key suitable for the cache system
         */
-       function getCacheKey ($onlyKeys = array(), $criteriaType = 'default');
+       function getCacheKey (array $onlyKeys = [], string $criteriaType = 'default');
 
        /**
         * "Getter" for a cache key ('choice' type)
@@ -215,7 +215,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $onlyKeys       Only use these keys for a cache key
         * @return      $cacheKey       The key suitable for the cache system
         */
-       function getCacheKeyChoice ($onlyKeys = array());
+       function getCacheKeyChoice (array $onlyKeys = []);
 
        /**
         * "Getter" for a cache key ('exclude' type)
@@ -223,16 +223,7 @@ interface Criteria extends FrameworkInterface {
         * @param       $onlyKeys       Only use these keys for a cache key
         * @return      $cacheKey       The key suitable for the cache system
         */
-       function getCacheKeyExclude ($onlyKeys = array());
-
-       /**
-        * Count the criteria, e.g. useful to find out if a database query has no
-        * limitation (search criteria).
-        *
-        * @param       $criteriaType   Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude'
-        * @return      $count  Count of all criteria entries
-        */
-       function count ($criteriaType = 'default');
+       function getCacheKeyExclude (array $onlyKeys = []);
 
        /**
         * Count 'choice' criteria, e.g. useful to find out if a database query