1 | <?php |
||
22 | class ProductAssociation implements ProductAssociationInterface |
||
23 | { |
||
24 | use TimestampableTrait; |
||
25 | |||
26 | /** |
||
27 | * @var mixed |
||
28 | */ |
||
29 | protected $id; |
||
30 | |||
31 | /** |
||
32 | * @var ProductAssociationTypeInterface |
||
33 | */ |
||
34 | protected $type; |
||
35 | |||
36 | /** |
||
37 | * @var ProductInterface |
||
38 | */ |
||
39 | protected $owner; |
||
40 | |||
41 | /** |
||
42 | * @var Collection|ProductInterface[] |
||
43 | */ |
||
44 | protected $associatedProducts; |
||
45 | |||
46 | public function __construct() |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function getId() |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function getType() |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function setType(ProductAssociationTypeInterface $type) |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function getOwner() |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function setOwner(ProductInterface $owner = null) |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function getAssociatedProducts() |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function hasAssociatedProduct(ProductInterface $product) |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | public function addAssociatedProduct(ProductInterface $product) |
||
118 | |||
119 | /** |
||
120 | * {@inheritdoc} |
||
121 | */ |
||
122 | public function removeAssociatedProduct(ProductInterface $product) |
||
128 | } |
||
129 |