1 | <?php |
||
66 | class TestItem implements Item { |
||
67 | |||
68 | public function __construct($aDescription,$aWidth,$aLength,$aDepth,$aWeight) { |
||
69 | $this->description = $aDescription; |
||
70 | $this->width = $aWidth; |
||
71 | $this->length = $aLength; |
||
72 | $this->depth = $aDepth; |
||
73 | $this->weight = $aWeight; |
||
74 | $this->volume = $this->width * $this->length * $this->depth; |
||
75 | } |
||
76 | |||
77 | public function getDescription() { |
||
78 | return $this->description; |
||
79 | } |
||
80 | |||
81 | public function getWidth() { |
||
82 | return $this->width; |
||
83 | } |
||
84 | |||
85 | public function getLength() { |
||
86 | return $this->length; |
||
87 | } |
||
88 | |||
89 | public function getDepth() { |
||
90 | return $this->depth; |
||
91 | } |
||
92 | |||
93 | public function getWeight() { |
||
94 | return $this->weight; |
||
95 | } |
||
96 | |||
97 | public function getVolume() { |
||
98 | return $this->volume; |
||
99 | } |
||
100 | } |
||
101 | |||
102 |