| 1 | <?php |
||
| 7 | class ProductItem extends AbstractBaseItem |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Unique product identifier, used to reference products (shirt, mug, etc) |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | public $productType; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | public $title; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Base price in USD (informative, not for calculating prices) |
||
| 23 | * |
||
| 24 | * @var float |
||
| 25 | */ |
||
| 26 | public $price; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Suggested selling price in USD based on base price. |
||
| 30 | * |
||
| 31 | * @var float |
||
| 32 | */ |
||
| 33 | public $sellingPrice; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param array|mixed $raw |
||
| 37 | * @return ProductItem |
||
| 38 | */ |
||
| 39 | static function fromArray($raw) |
||
| 52 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.