1: <?php
2: /**
3: * Json representation of the Product AR model.
4: *
5: * This is the interface of the Product AR model exposed through the JSON API.
6: *
7: * @package RestApi.Objects
8: * @author Konstantinos Filios <konfilios@gmail.com>
9: */
10: class ProductJson extends CBJsonModel
11: {
12: /**
13: * Types of non-scalar members.
14: *
15: * @return string[]
16: */
17: public function getAttributeTypes()
18: {
19: return array(
20: 'manufacturer' => 'ManufacturerJson',
21: 'categories' => 'ProductCategoryJson[]',
22: );
23: }
24:
25: /**
26: * Product id.
27: * @var integer
28: */
29: public $id;
30:
31: /**
32: * Product title.
33: * @var string
34: */
35: public $title;
36:
37: /**
38: * Product price.
39: * @var double
40: */
41: public $price;
42:
43: /**
44: * Manufacturer.
45: * @var ManufacturerJson
46: */
47: public $manufacturer;
48:
49: /**
50: * Relevant categories.
51: * @var ProductCategoryJson[]
52: */
53: public $categories = array();
54: }
55: