1
|
|
|
<?php namespace GameScan\WoW\Entity; |
2
|
|
|
|
3
|
|
|
use GameScan\WoW\WowApiRequest; |
4
|
|
|
|
5
|
|
|
class Item extends Base |
6
|
|
|
{ |
7
|
|
|
protected $itemId; |
8
|
|
|
|
9
|
|
View Code Duplication |
public function __construct(WowApiRequest $api, $itemId, $locale = null) |
|
|
|
|
10
|
|
|
{ |
11
|
|
|
$this->apiRequest = $api; |
12
|
|
|
$this->itemId = $itemId; |
13
|
|
|
if ($locale !== null) { |
14
|
|
|
$this->apiRequest->setLocale($locale); |
15
|
|
|
} |
16
|
|
|
$this->loadInformation(); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
public function getRessource() |
20
|
|
|
{ |
21
|
|
|
return "/wow/item/" . $this->itemId; |
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
public function id() |
25
|
|
|
{ |
26
|
|
|
return $this->getEntityInformations()->id; |
|
|
|
|
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
public function disenchantingSkillRank() |
30
|
|
|
{ |
31
|
|
|
return $this->getEntityInformations()->disenchantingSkillRank; |
|
|
|
|
32
|
|
|
} |
33
|
|
|
public function description() |
34
|
|
|
{ |
35
|
|
|
return $this->getEntityInformations()->description; |
|
|
|
|
36
|
|
|
} |
37
|
|
|
public function name() |
38
|
|
|
{ |
39
|
|
|
return $this->getEntityInformations()->name; |
|
|
|
|
40
|
|
|
} |
41
|
|
|
public function icon() |
42
|
|
|
{ |
43
|
|
|
return $this->getEntityInformations()->icon; |
|
|
|
|
44
|
|
|
} |
45
|
|
|
public function stackable() |
46
|
|
|
{ |
47
|
|
|
return $this->getEntityInformations()->stackable; |
|
|
|
|
48
|
|
|
} |
49
|
|
|
public function itemBind() |
50
|
|
|
{ |
51
|
|
|
return $this->getEntityInformations()->itemBind; |
|
|
|
|
52
|
|
|
} |
53
|
|
|
public function bonusStats() |
54
|
|
|
{ |
55
|
|
|
return $this->getEntityInformations()->bonusStats; |
|
|
|
|
56
|
|
|
} |
57
|
|
|
public function itemSpells() |
58
|
|
|
{ |
59
|
|
|
return $this->getEntityInformations()->itemSpells; |
|
|
|
|
60
|
|
|
} |
61
|
|
|
public function buyPrice() |
62
|
|
|
{ |
63
|
|
|
return $this->getEntityInformations()->buyPrice; |
|
|
|
|
64
|
|
|
} |
65
|
|
|
public function itemClass() |
66
|
|
|
{ |
67
|
|
|
return $this->getEntityInformations()->itemClass; |
|
|
|
|
68
|
|
|
} |
69
|
|
|
public function itemSubClass() |
70
|
|
|
{ |
71
|
|
|
return $this->getEntityInformations()->itemSubClass; |
|
|
|
|
72
|
|
|
} |
73
|
|
|
public function containerSlots() |
74
|
|
|
{ |
75
|
|
|
return $this->getEntityInformations()->containerSlots; |
|
|
|
|
76
|
|
|
} |
77
|
|
|
public function weaponInfo() |
78
|
|
|
{ |
79
|
|
|
return $this->getEntityInformations()->weaponInfo; |
|
|
|
|
80
|
|
|
} |
81
|
|
|
public function inventoryType() |
82
|
|
|
{ |
83
|
|
|
return $this->getEntityInformations()->inventoryType; |
|
|
|
|
84
|
|
|
} |
85
|
|
|
public function equippable() |
86
|
|
|
{ |
87
|
|
|
return $this->getEntityInformations()->equippable; |
|
|
|
|
88
|
|
|
} |
89
|
|
|
public function itemLevel() |
90
|
|
|
{ |
91
|
|
|
return $this->getEntityInformations()->itemLevel; |
|
|
|
|
92
|
|
|
} |
93
|
|
|
public function maxCount() |
94
|
|
|
{ |
95
|
|
|
return $this->getEntityInformations()->maxCount; |
|
|
|
|
96
|
|
|
} |
97
|
|
|
public function maxDurability() |
98
|
|
|
{ |
99
|
|
|
return $this->getEntityInformations()->maxDurability; |
|
|
|
|
100
|
|
|
} |
101
|
|
|
public function minFactionId() |
102
|
|
|
{ |
103
|
|
|
return $this->getEntityInformations()->minFactionId; |
|
|
|
|
104
|
|
|
} |
105
|
|
|
public function minReputation() |
106
|
|
|
{ |
107
|
|
|
return $this->getEntityInformations()->minReputation; |
|
|
|
|
108
|
|
|
} |
109
|
|
|
public function quality() |
110
|
|
|
{ |
111
|
|
|
return $this->getEntityInformations()->quality; |
|
|
|
|
112
|
|
|
} |
113
|
|
|
public function sellPrice() |
114
|
|
|
{ |
115
|
|
|
return $this->getEntityInformations()->sellPrice; |
|
|
|
|
116
|
|
|
} |
117
|
|
|
public function requiredSkill() |
118
|
|
|
{ |
119
|
|
|
return $this->getEntityInformations()->requiredSkill; |
|
|
|
|
120
|
|
|
} |
121
|
|
|
public function requiredLevel() |
122
|
|
|
{ |
123
|
|
|
return $this->getEntityInformations()->requiredLevel; |
|
|
|
|
124
|
|
|
} |
125
|
|
|
public function requiredSkillRank() |
126
|
|
|
{ |
127
|
|
|
return $this->getEntityInformations()->requiredSkillRank; |
|
|
|
|
128
|
|
|
} |
129
|
|
|
public function itemSource() |
130
|
|
|
{ |
131
|
|
|
return $this->getEntityInformations()->itemSource; |
|
|
|
|
132
|
|
|
} |
133
|
|
|
public function baseArmor() |
134
|
|
|
{ |
135
|
|
|
return $this->getEntityInformations()->baseArmor; |
|
|
|
|
136
|
|
|
} |
137
|
|
|
public function hasSockets() |
138
|
|
|
{ |
139
|
|
|
return $this->getEntityInformations()->hasSockets; |
|
|
|
|
140
|
|
|
} |
141
|
|
|
public function isAuctionable() |
142
|
|
|
{ |
143
|
|
|
return $this->getEntityInformations()->isAuctionable; |
|
|
|
|
144
|
|
|
} |
145
|
|
|
public function armor() |
146
|
|
|
{ |
147
|
|
|
return $this->getEntityInformations()->armor; |
|
|
|
|
148
|
|
|
} |
149
|
|
|
public function displayInfoId() |
150
|
|
|
{ |
151
|
|
|
return $this->getEntityInformations()->displayInfoId; |
|
|
|
|
152
|
|
|
} |
153
|
|
|
public function nameDescription() |
154
|
|
|
{ |
155
|
|
|
return $this->getEntityInformations()->nameDescription; |
|
|
|
|
156
|
|
|
} |
157
|
|
|
public function nameDescriptionColor() |
158
|
|
|
{ |
159
|
|
|
return $this->getEntityInformations()->nameDescriptionColor; |
|
|
|
|
160
|
|
|
} |
161
|
|
|
public function upgradable() |
162
|
|
|
{ |
163
|
|
|
return $this->getEntityInformations()->upgradable; |
|
|
|
|
164
|
|
|
} |
165
|
|
|
public function heroicTooltip() |
166
|
|
|
{ |
167
|
|
|
return $this->getEntityInformations()->heroicTooltip; |
|
|
|
|
168
|
|
|
} |
169
|
|
|
public function context() |
170
|
|
|
{ |
171
|
|
|
return $this->getEntityInformations()->context; |
|
|
|
|
172
|
|
|
} |
173
|
|
|
public function bonusLists() |
174
|
|
|
{ |
175
|
|
|
return $this->getEntityInformations()->bonusLists; |
|
|
|
|
176
|
|
|
} |
177
|
|
|
public function availableContexts() |
178
|
|
|
{ |
179
|
|
|
return $this->getEntityInformations()->availableContexts; |
|
|
|
|
180
|
|
|
} |
181
|
|
|
public function bonusSummary() |
182
|
|
|
{ |
183
|
|
|
return $this->getEntityInformations()->bonusSummary; |
|
|
|
|
184
|
|
|
} |
185
|
|
|
} |
186
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.