X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Finterfaces%2Fcriteria%2Fclass_Criteria.php;fp=inc%2Fclasses%2Finterfaces%2Fcriteria%2Fclass_Criteria.php;h=0000000000000000000000000000000000000000;hp=9609302f2c750644472d35217296d5ca98015bde;hb=751f9e6c51f00dba27757b72fc85490e51fd3797;hpb=5203f9bd014ad46fbc7ee54e7223dcd46e14e3b4 diff --git a/inc/classes/interfaces/criteria/class_Criteria.php b/inc/classes/interfaces/criteria/class_Criteria.php deleted file mode 100644 index 9609302f..00000000 --- a/inc/classes/interfaces/criteria/class_Criteria.php +++ /dev/null @@ -1,249 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -interface Criteria extends FrameworkInterface { - /** - * Setter for wrapper class name - * - * @param $wrapperConfigEntry Configuration entry which hold the wrapper class' name - * @return void - */ - function setWrapperConfigEntry ($wrapperConfigEntry); - - /** - * Getter for wrapper class name - * - * @return $wrapperConfigEntry Configuration entry which hold the wrapper class' name - */ - 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 - * - * @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude' - * @return $criteria - */ - function getCriteriaArray ($criteriaType = 'default'); - - /** - * Getter for criteria array 'choice' type - * - * @return $criteria - */ - function getCriteriaChoiceArray (); - - /** - * Getter for criteria array 'exclude' type - * - * @return $criteria - */ - 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. - * - * @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 - */ - function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default'); - - /** - * Sets 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 - */ - function setCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default'); - - /** - * 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 - */ - function addChoiceCriteria ($criteriaKey, $criteriaValue); - - /** - * Add "exclude" 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 - */ - function addExcludeCriteria ($criteriaKey, $criteriaValue); - - /** - * Add configured criteria - * - * @param $criteriaKey Criteria key - * @param $configEntry Configuration entry - * @param $criteriaType Type of this criteria, can be one of 'default' (default), 'choice' or 'exclude' - * @return void - */ - function addConfiguredCriteria ($criteriaKey, $configEntry, $criteriaType = 'default'); - - /** - * 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 FALSE - */ - function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default'); - - /** - * 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 FALSE - */ - function getCriteriaChoiceElemnent ($criteriaKey); - - /** - * 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 FALSE - */ - function getCriteriaExcludeElemnent ($criteriaKey); - - /** - * Checks whether given array entry matches - * - * @param $entryArray Array with the entries to find - * @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'); - - /** - * Checks whether given array 'choice' entry matches - * - * @param $entryArray Array with the entries to find - * @return $matches Whether the entry matches or not - */ - function ifChoiceMatches (array $entryArray); - - /** - * Checks whether given array 'exclude' entry matches - * - * @param $entryArray Array with the entries to find - * @return $matches Whether the entry matches or not - */ - function ifExcludeMatches (array $entryArray); - - /** - * "Getter" for a cache key - * - * @param $onlyKeys Only use these keys for a cache key - * @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'); - - /** - * "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()); - - /** - * "Getter" for a cache key ('exclude' type) - * - * @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'); - - /** - * Count 'choice' criteria, e.g. useful to find out if a database query - * has no limitation (search criteria). - * - * @return $count Count of all criteria entries - */ - function countChoice (); - - /** - * Count 'exclude' criteria, e.g. useful to find out if a database query - * has no limitation (search criteria). - * - * @return $count Count of all criteria entries - */ - function countExclude (); -} - -// [EOF] -?>