| 1 | <?php |
||
| 7 | trait PackageData |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Set the item at a given offset |
||
| 11 | * |
||
| 12 | * @param string $key |
||
| 13 | * @param mixed $value |
||
| 14 | * |
||
| 15 | * @return void |
||
| 16 | */ |
||
| 17 | abstract public function offsetSet($key, $value); |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param float $width |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | 1 | public function setWidth(float $width): void |
|
| 25 | { |
||
| 26 | 1 | $this->offsetSet(Option::WIDTH, $width); |
|
| 27 | 1 | } |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @param float $length |
||
| 31 | * |
||
| 32 | * @return void |
||
| 33 | */ |
||
| 34 | 1 | public function setLength(float $length): void |
|
| 35 | { |
||
| 36 | 1 | $this->offsetSet(Option::LENGTH, $length); |
|
| 37 | 1 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @param float $height |
||
| 41 | * |
||
| 42 | * @return void |
||
| 43 | */ |
||
| 44 | 1 | public function setHeight(float $height): void |
|
| 45 | { |
||
| 46 | 1 | $this->offsetSet(Option::HEIGHT, $height); |
|
| 47 | 1 | } |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @param float $weight |
||
| 51 | * |
||
| 52 | * @return void |
||
| 53 | */ |
||
| 54 | 1 | public function setWeight(float $weight): void |
|
| 55 | { |
||
| 56 | 1 | $this->offsetSet(Option::WEIGHT, $weight); |
|
| 57 | 1 | } |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @param float $price |
||
| 61 | * |
||
| 62 | * @return void |
||
| 63 | */ |
||
| 64 | 2 | public function setPrice(float $price): void |
|
| 65 | { |
||
| 66 | 2 | $this->offsetSet(Option::PRICE, $price); |
|
| 67 | 2 | } |
|
| 68 | |||
| 69 | /** |
||
| 70 | * @param float $volume |
||
| 71 | * |
||
| 72 | * @return void |
||
| 73 | */ |
||
| 74 | 1 | public function setVolume(float $volume): void |
|
| 75 | { |
||
| 76 | 1 | $this->offsetSet(Option::VOLUME, $volume); |
|
| 77 | 1 | } |
|
| 78 | |||
| 79 | /** |
||
| 80 | * @param bool $overDimension |
||
| 81 | * |
||
| 82 | * @return void |
||
| 83 | */ |
||
| 84 | 1 | public function setOverDimension(bool $overDimension = true): void |
|
| 85 | { |
||
| 86 | 1 | $this->offsetSet(Option::OVER_DIMENSION, (int) $overDimension); |
|
| 87 | 1 | } |
|
| 88 | |||
| 89 | /** |
||
| 90 | * @param string $currency |
||
| 91 | * |
||
| 92 | * @return void |
||
| 93 | */ |
||
| 94 | 1 | public function setInsCurrency(string $currency): void |
|
| 98 | } |
||
| 99 |