-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProductClass.php
99 lines (80 loc) · 2.14 KB
/
ProductClass.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
class Product {
private $price;
private $stock;
private $code;
private $volumeSale;
private $volumePrice;
private $volumeSize;
private $buy1Get1;
private $withWhich;
public function __construct($price, $stock, $code, $volumeSale, $volumePrice, $volumeSize, $buy1Get1, $withWhich) {
$this->price = $price;
$this->stock = $stock;
$this->code = $code;
$this->volumeSale = $volumeSale;
$this->volumePrice = $volumePrice;
$this->volumeSize = $volumeSize;
$this->buy1Get1 = $buy1Get1;
$this->withWhich = $withWhich;
}
public function getPrice() {
return $this->price;
}
public function setPrice($price) {
$this->price = $price;
}
public function getStock() {
return $this->stock;
}
public function setStock($stock) {
$this->stock = $stock;
}
public function getCode() {
return $this->code;
}
public function setCode($code) {
$this->code = $code;
}
public function isVolumeSale() {
return $this->volumeSale;
}
public function setVolumeSale($volumeSale) {
$this->volumeSale = $volumeSale;
}
public function getVolumePrice() {
return $this->volumePrice;
}
public function setVolumePrice($volumePrice) {
$this->volumePrice = $volumePrice;
}
public function getVolumeSize() {
return $this->volumeSize;
}
public function setVolumeSize($volumeSize) {
$this->volumeSize = $volumeSize;
}
public function isBuy1Get1() {
return $this->buy1Get1;
}
public function setBuy1Get1($buy1Get1) {
$this->buy1Get1 = $buy1Get1;
}
public function getWithWhich() {
return $this->withWhich;
}
public function setWithWhich($withWhich) {
$this->withWhich = $withWhich;
}
public function toString(){
return $this->price . " ".
$this->stock ." ".
$this->code." ".
$this->volumeSale." ".
$this->volumePrice." ".
$this->volumeSize." ".
$this->buy1Get1." ".
$this->withWhich. "</br>";
}
}
?>