DHL-PHP-SDK  v0.4
A wrapper for the DHL-XML-API Version 2
Product.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Petschko\DHL;
4 
19 class Product {
25  private $type;
26 
32  private $name = '';
33 
39  private $austria = false;
40 
46  private $minLength = 0;
47 
53  private $maxLength = 0;
54 
60  private $minWidth = 0;
61 
67  private $maxWidth = 0;
68 
74  private $minHeight = 0;
75 
81  private $maxHeight = 0;
82 
88  private $maxWeight = 0;
89 
95  private $services = array();
96 
102  public function __construct($type) {
103  $this->setType($type);
104  }
105 
109  public function __destruct() {
110  unset($this->type);
111  unset($this->name);
112  unset($this->austria);
113  unset($this->minLength);
114  unset($this->maxLength);
115  unset($this->minWidth);
116  unset($this->maxWidth);
117  unset($this->minHeight);
118  unset($this->maxHeight);
119  unset($this->maxWeight);
120  unset($this->services);
121  }
122 
128  public function getType() {
129  return $this->type;
130  }
131 
137  private function setType($type) {
138  $this->type = $type;
139  }
140 
146  public function getName() {
147  return $this->name;
148  }
149 
155  public function setName($name) {
156  $this->name = $name;
157  }
158 
164  public function isAustria() {
165  return $this->austria;
166  }
167 
173  public function setAustria($austria) {
174  $this->austria = $austria;
175  }
176 
182  public function getMinLength() {
183  return $this->minLength;
184  }
185 
191  public function setMinLength($minLength) {
192  $this->minLength = $minLength;
193  }
194 
200  public function getMaxLength() {
201  return $this->maxLength;
202  }
203 
209  public function setMaxLength($maxLength) {
210  $this->maxLength = $maxLength;
211  }
212 
218  public function getMinWidth() {
219  return $this->minWidth;
220  }
221 
227  public function setMinWidth($minWidth) {
228  $this->minWidth = $minWidth;
229  }
230 
236  public function getMaxWidth() {
237  return $this->maxWidth;
238  }
239 
245  public function setMaxWidth($maxWidth) {
246  $this->maxWidth = $maxWidth;
247  }
248 
254  public function getMinHeight() {
255  return $this->minHeight;
256  }
257 
263  public function setMinHeight($minHeight) {
264  $this->minHeight = $minHeight;
265  }
266 
272  public function getMaxHeight() {
273  return $this->maxHeight;
274  }
275 
281  public function setMaxHeight($maxHeight) {
282  $this->maxHeight = $maxHeight;
283  }
284 
290  public function getMaxWeight() {
291  return $this->maxWeight;
292  }
293 
299  public function setMaxWeight($maxWeight) {
300  $this->maxWeight = $maxWeight;
301  }
302 
308  public function getServices() {
309  return $this->services;
310  }
311 
317  public function setServices($services) {
318  $this->services = $services;
319  }
320 
326  public function addService($service) {
327  $this->services[] = $service;
328  }
329 
336  public function hasService($service) {
337  return in_array($service, $this->services);
338  }
339 }
setMaxLength($maxLength)
Definition: Product.php:209
setMaxHeight($maxHeight)
Definition: Product.php:281
setMinLength($minLength)
Definition: Product.php:191
setMinWidth($minWidth)
Definition: Product.php:227
addService($service)
Definition: Product.php:326
setMinHeight($minHeight)
Definition: Product.php:263
setServices($services)
Definition: Product.php:317
setAustria($austria)
Definition: Product.php:173
hasService($service)
Definition: Product.php:336
setMaxWidth($maxWidth)
Definition: Product.php:245
$service
Definition: test.php:34
setMaxWeight($maxWeight)
Definition: Product.php:299