Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 94 lines (80 sloc) 1.555 kb
94ad799 Timo A. Hummel Initial commit
felicitus authored
1 <?php
2
3 class Item {
4 /**
5 * The name of the item
6 * @var string
7 */
8 private $name;
9
10 /**
11 * The description of the item
12 * @var string
13 */
14 private $description;
15
16 /**
17 * The image filename excluding the path
18 * @var string
19 */
20 private $image;
21
22 /**
23 * An array of SizePrice objects which contain the sizes and prices
24 * @var array
25 */
26 private $sizePrices = array();
27
28 /**
29 * Sets the name of the item
30 * @param string $name
31 */
32 public function setName ($name) {
33 $this->name = $name;
34 }
35
36 /**
37 * Returns the name of the item
38 *
39 * @return string The item name
40 */
41 public function getName () {
42 return $this->name;
43 }
44
45 /**
46 * Sets the description of the item
47 * @param string $description
48 */
49 public function setDescription ($description) {
50 $this->description = $description;
51 }
52
53 /**
54 * Returns the description of the item
55 * @return string The description
56 */
57 public function getDescription () {
58 return $this->description;
59 }
60
61 /**
62 * Sets the image name
63 * @param string $image
64 */
65 public function setImage ($image) {
66 $this->image = $image;
67 }
68
69 /**
70 * Returns the image name
71 * @return string The image name
72 */
73 public function getImage () {
74 return $this->image;
75 }
76
77 /**
78 * Adds a SizePrice
79 * @param SizePrice $sizePrice
80 */
81 public function addSizePrice (SizePrice $sizePrice) {
82 $this->sizePrices[] = $sizePrice;
83 }
84
85 /**
86 * Returns all SizePrice objects
87 * @return array an array of SizePrice objects
88 */
89 public function getSizePrices () {
90 return $this->sizePrices;
91 }
92
93 }
Something went wrong with that request. Please try again.