forked from Drachenkaetzchen/rzl_merchandise
/
Item.php
93 lines (80 loc) · 1.52 KB
/
Item.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
<?php
class Item {
/**
* The name of the item
* @var string
*/
private $name;
/**
* The description of the item
* @var string
*/
private $description;
/**
* The image filename excluding the path
* @var string
*/
private $image;
/**
* An array of SizePrice objects which contain the sizes and prices
* @var array
*/
private $sizePrices = array();
/**
* Sets the name of the item
* @param string $name
*/
public function setName ($name) {
$this->name = $name;
}
/**
* Returns the name of the item
*
* @return string The item name
*/
public function getName () {
return $this->name;
}
/**
* Sets the description of the item
* @param string $description
*/
public function setDescription ($description) {
$this->description = $description;
}
/**
* Returns the description of the item
* @return string The description
*/
public function getDescription () {
return $this->description;
}
/**
* Sets the image name
* @param string $image
*/
public function setImage ($image) {
$this->image = $image;
}
/**
* Returns the image name
* @return string The image name
*/
public function getImage () {
return $this->image;
}
/**
* Adds a SizePrice
* @param SizePrice $sizePrice
*/
public function addSizePrice (SizePrice $sizePrice) {
$this->sizePrices[] = $sizePrice;
}
/**
* Returns all SizePrice objects
* @return array an array of SizePrice objects
*/
public function getSizePrices () {
return $this->sizePrices;
}
}