* 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;
}
- /**
- * 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
- */
- public function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
- $this->updateCriteria[$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
- */
- public function addConfiguredCriteria ($criteriaKey, $configEntry, $criteriaType = 'default') {
- // Add the configuration entry as a criteria
- $value = $this->getConfigInstance()->getConfigEntry($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();
}
}