* you are looking for a ship or company, or what ever. Instead use this class
* for looking in storages like the database.
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @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
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class UpdateCriteria extends BaseCriteria implements LocalUpdateCriteria {
- /**
- * Criteria to handle
- */
- private $updateCriteria = array();
-
- /**
- * Limitation for the update
- */
- private $limit = 0;
-
- /**
- * Skip these entries before using them
- */
- private $skip = 0;
-
/**
* Protected constructor
*
*
* @return $criteriaInstance An instance of this criteria
*/
- public final static function createUpdateCriteria () {
+ public static final function createUpdateCriteria () {
// Get a new instance
$criteriaInstance = new UpdateCriteria();
return $criteriaInstance;
}
- /**
- * Add criteria
- *
- * @param $criteriaKey Criteria key
- * @param $criteriaValue Criteria value
- * @return void
- */
- public function addCriteria ($criteriaKey, $criteriaValue) {
- $this->updateCriteria[$criteriaKey] = $criteriaValue;
- }
-
- /**
- * Add configured criteria
- *
- * @param $criteriaKey Criteria key
- * @param $configEntry Configuration entry
- * @return void
- */
- public function addConfiguredCriteria ($criteriaKey, $configEntry) {
- // Add the configuration entry as a criteria
- $value = $this->getConfigInstance()->readConfig($configEntry);
- $this->addCriteria($criteriaKey, $value);
- }
-
/**
* Getter for update criteria array
*
* @return $updateCriteria Array holding the update criteria
*/
public final function getUpdateCriteria () {
- return $this->updateCriteria;
+ return $this->getCriteriaArray();
}
}