/** * Adds a range condition to the filter ( min <= value <= max). * * @param string $attributeName The name of the attribute which you want to filter. * @param string $minValue The minimum value * @param string $maxValue The maximum value * @param bool $minInclusive true if values that are equal to the min boundary are accepted * @param bool $maxInclusive true if value that are equal to the max boundary are accepted */ public function addConditionRange($attributeName, $minValue, $maxValue, $minInclusive = true, $maxInclusive = true) { $filter = $minValue . ',' . $maxValue; $filter = ($minInclusive ? '[' : '(') . $filter; $filter = $filter . ($maxInclusive ? ']' : ')'); Utils::addPairToUniqueArray($this->conditions, $attributeName, $filter); }
/** * Adds a new attribute to this item description. * @param string $attributeName The name of the attribute you want to specify. * @param string $value The attribute value. */ public function addAttribute($attributeName, $value) { Utils::addPairToUniqueArray($this->attributes, $attributeName, $value); }
/** * Adds an item to the list. * @param integer $profileMapId The profile identifier of this item * @param string $itemId The item identifier */ public function addBasketItem($profileMapId, $itemId) { Utils::addPairToUniqueArray($this->basketItems, $profileMapId, $itemId); }