1 | <?php namespace SimpleUPS; |
||
7 | class Weight extends Model |
||
8 | { |
||
9 | private |
||
10 | /* @var string $code */ |
||
11 | $code = 'LBS', |
||
12 | |||
13 | /* @var string $description */ |
||
14 | $description, |
||
15 | |||
16 | /* @var float $weight */ |
||
17 | $weight; |
||
18 | |||
19 | /** |
||
20 | * @internal |
||
21 | * |
||
22 | * @param string $code |
||
23 | * |
||
24 | * @return Weight |
||
25 | */ |
||
26 | public function setCode($code) |
||
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | public function getCode() |
||
39 | |||
40 | /** |
||
41 | * @internal |
||
42 | * |
||
43 | * @param string $description |
||
44 | * |
||
45 | * @return Weight |
||
46 | */ |
||
47 | public function setDescription($description) |
||
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getDescription() |
||
60 | |||
61 | /** |
||
62 | * @internal |
||
63 | * |
||
64 | * @param float $weight |
||
65 | * |
||
66 | * @return Weight |
||
67 | */ |
||
68 | public function setWeight($weight) |
||
73 | |||
74 | /** |
||
75 | * @return float |
||
76 | */ |
||
77 | public function getWeight() |
||
81 | |||
82 | /** |
||
83 | * Determine if the unit of measurement is LBS |
||
84 | * @return bool |
||
85 | */ |
||
86 | public function isPounds() |
||
90 | |||
91 | /** |
||
92 | * Determine if the unit of measurement is KGS |
||
93 | * @return bool |
||
94 | */ |
||
95 | public function isKilograms() |
||
99 | |||
100 | /** |
||
101 | * @internal |
||
102 | * |
||
103 | * @param \DomDocument $dom |
||
104 | * |
||
105 | * @return \DOMElement |
||
106 | */ |
||
107 | public function toXml(\DomDocument $dom) |
||
122 | |||
123 | /** |
||
124 | * @internal |
||
125 | * |
||
126 | * @param \SimpleXMLElement $xml |
||
127 | * |
||
128 | * @return Weight |
||
129 | */ |
||
130 | public static function fromXml(\SimpleXMLElement $xml) |
||
141 | } |