1 | <?php |
||
11 | class EntityProperty |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var string Entity property type |
||
16 | */ |
||
17 | protected $type; |
||
18 | |||
19 | /** |
||
20 | * @param string $type |
||
21 | */ |
||
22 | 1 | public function __construct(string $type) |
|
26 | |||
27 | /** |
||
28 | * Format value according to entity property type |
||
29 | * |
||
30 | * @param mixed $value Value |
||
31 | * |
||
32 | * @return mixed Value |
||
33 | */ |
||
34 | 5 | public function formatValueForEntity($value) |
|
57 | |||
58 | /** |
||
59 | * Format value for insertion into the database |
||
60 | * |
||
61 | * @param mixed $value Value |
||
62 | * |
||
63 | * @return mixed Value |
||
64 | */ |
||
65 | 2 | public function formatValueForDatabase($value) |
|
85 | } |
||
86 |