1 | <?php |
||
30 | class Product extends MagicAttributes |
||
31 | { |
||
32 | |||
33 | private $shelf; |
||
34 | |||
35 | /** |
||
36 | * 是否在货架上 |
||
37 | * |
||
38 | * @param bool|false $shelf |
||
39 | */ |
||
40 | public function __construct($shelf = false) |
||
44 | |||
45 | /** |
||
46 | * |
||
47 | * 设置基本属性 |
||
48 | * |
||
49 | * @param $main_img |
||
50 | * @param array $img |
||
51 | * @param null $buyLimit |
||
52 | * @param null $name |
||
53 | * @param null $categoryId |
||
54 | * @return $this |
||
55 | * @throws ShopsException |
||
56 | */ |
||
57 | public function setBaseAttr($main_img, array $img, $buyLimit = null,$name = null, $categoryId = null) |
||
79 | |||
80 | /** |
||
81 | * 商品详情列表 |
||
82 | * |
||
83 | * @param $name |
||
84 | * @param $value |
||
85 | * @return $this |
||
86 | * @throws ShopsException |
||
87 | */ |
||
88 | public function setDetail($name,$value) |
||
97 | |||
98 | /** |
||
99 | * 商品属性列表 |
||
100 | * |
||
101 | * @param $id |
||
102 | * @param $vid |
||
103 | * @return $this |
||
104 | */ |
||
105 | public function setProperty($id,$vid) |
||
114 | |||
115 | /** |
||
116 | * 设置sku |
||
117 | * |
||
118 | * @param $id |
||
119 | * @param array $vid |
||
120 | * @return $this |
||
121 | */ |
||
122 | public function setSkuInfo($id, array $vid) |
||
133 | |||
134 | /** |
||
135 | * sku信息列表 |
||
136 | * |
||
137 | * @param $oriPrice |
||
138 | * @param $price |
||
139 | * @param $iconUrl |
||
140 | * @param $quantity |
||
141 | * @param null $skuId |
||
142 | * @return $this |
||
143 | */ |
||
144 | public function setSkuList($oriPrice, $price, $iconUrl, $quantity, $skuId = null) |
||
164 | |||
165 | /** |
||
166 | * 商品其他属性 |
||
167 | * |
||
168 | * @param $isPostFree |
||
169 | * @param $isHasReceipt |
||
170 | * @param $isUnderGuaranty |
||
171 | * @param $isSupportReplace |
||
172 | * @return $this |
||
173 | */ |
||
174 | public function setAttrext($isPostFree, $isHasReceipt, $isUnderGuaranty, $isSupportReplace) |
||
185 | |||
186 | public function setLocation($province, $city, $address, $country = '中国') |
||
197 | |||
198 | /** |
||
199 | * 运费信息 |
||
200 | * |
||
201 | * @param $deliveryType |
||
202 | * @param null $template |
||
203 | * @return $this |
||
204 | * @throws ShopsException |
||
205 | */ |
||
206 | public function setDeliveryInfo($deliveryType, $template = null) |
||
219 | |||
220 | /** |
||
221 | * 默认模板 |
||
222 | * |
||
223 | * @param $id |
||
224 | * @param $price |
||
225 | * @return $this |
||
226 | */ |
||
227 | public function setExpress($id, $price) |
||
236 | |||
237 | /** |
||
238 | * 拼接最后的data |
||
239 | * |
||
240 | * @return array |
||
241 | * @throws ShopsException |
||
242 | */ |
||
243 | public function toArray() |
||
268 | |||
269 | public function __isset($name) |
||
273 | } |
This check looks for variables that are accessed but have not been defined. It raises an issue if it finds another variable that has a similar name.
The variable may have been renamed without also renaming all references.