1 | <?php |
||
22 | class AsDbReference extends SlumberAnnotation implements PropertyStorageMarker, PropertyMappingMarker |
||
23 | { |
||
24 | /** |
||
25 | * Set this to true if the reference should be handled as a lazy reference. |
||
26 | * |
||
27 | * TODO: Fully remove the lazy switch since lazy is the default and only behaviour |
||
28 | * |
||
29 | * @var bool |
||
30 | */ |
||
31 | public $lazy = true; |
||
32 | |||
33 | /** @var AsObject */ |
||
34 | private $objectOptions; |
||
35 | |||
36 | /** |
||
37 | * @return mixed |
||
38 | */ |
||
39 | public function getValue() |
||
43 | |||
44 | /** |
||
45 | * @return AsObject |
||
46 | */ |
||
47 | 17 | public function getObjectOptions() |
|
51 | |||
52 | /** |
||
53 | * @param AsObject $objectOptions |
||
54 | * |
||
55 | * @return $this |
||
56 | */ |
||
57 | public function setObjectOptions(AsObject $objectOptions) |
||
63 | |||
64 | /** |
||
65 | * Initialize the annotation and validate the given parameters |
||
66 | * |
||
67 | * @param ValidationContext $context |
||
68 | * |
||
69 | * @throws SlumberException |
||
70 | */ |
||
71 | public function validate(ValidationContext $context) |
||
80 | |||
81 | //// Delegate to the object options ////////////////////////////////////////////////////////////////////////////// |
||
82 | |||
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getAlias() |
||
90 | |||
91 | /** |
||
92 | * @return bool |
||
93 | */ |
||
94 | public function hasAlias() |
||
98 | |||
99 | /** |
||
100 | * @return bool |
||
101 | */ |
||
102 | 17 | public function keepNullValuesInCollections() |
|
106 | } |
||
107 |