-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProduct.php
More file actions
112 lines (83 loc) · 2.17 KB
/
Product.php
File metadata and controls
112 lines (83 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php declare(strict_types = 1);
namespace App\ProductModule\Entity;
class Product implements \Spameri\Elastic\Entity\ElasticEntityInterface
{
/**
* @var \Spameri\Elastic\Entity\Property\ElasticIdInterface
*/
private $id;
/**
* @var \App\ProductModule\Entity\Product\IsPublic
*/
private $isPublic;
/**
* @var \App\ProductModule\Entity\Product\Name
*/
private $name;
/**
* @var \App\ProductModule\Entity\Product\Content
*/
private $content;
/**
* @var \App\ProductModule\Entity\Product\Details
*/
private $details;
/**
* @var \App\ProductModule\Entity\Product\Price
*/
private $price;
/**
* @var \App\ProductModule\Entity\Product\ParameterValuesCollection
*/
private $parameterValues;
public function __construct(
\Spameri\Elastic\Entity\Property\ElasticIdInterface $id
, \App\ProductModule\Entity\Product\IsPublic $isPublic
, \App\ProductModule\Entity\Product\Name $name
, \App\ProductModule\Entity\Product\Content $content
, \App\ProductModule\Entity\Product\Details $details
, \App\ProductModule\Entity\Product\Price $price
, \App\ProductModule\Entity\Product\ParameterValuesCollection $parameterValues
)
{
$this->id = $id;
$this->isPublic = $isPublic;
$this->name = $name;
$this->content = $content;
$this->details = $details;
$this->price = $price;
$this->parameterValues = $parameterValues;
}
public function id(): \Spameri\Elastic\Entity\Property\ElasticIdInterface
{
return $this->id;
}
public function entityVariables(): array
{
return \get_object_vars($this);
}
public function isPublic() : \App\ProductModule\Entity\Product\IsPublic
{
return $this->isPublic;
}
public function name() : \App\ProductModule\Entity\Product\Name
{
return $this->name;
}
public function content() : \App\ProductModule\Entity\Product\Content
{
return $this->content;
}
public function details() : \App\ProductModule\Entity\Product\Details
{
return $this->details;
}
public function price() : \App\ProductModule\Entity\Product\Price
{
return $this->price;
}
public function parameterValues() : \App\ProductModule\Entity\Product\ParameterValuesCollection
{
return $this->parameterValues;
}
}