1 | <?php |
||
14 | class AnnotationDefinitionProvider implements DefinitionProviderInterface |
||
15 | { |
||
16 | /** |
||
17 | * Doctrine annotation reader |
||
18 | * |
||
19 | * @var Reader |
||
20 | */ |
||
21 | protected $reader; |
||
22 | |||
23 | /** |
||
24 | * AnnotationDefinitionProvider constructor. |
||
25 | * |
||
26 | * @param Reader $reader |
||
27 | */ |
||
28 | 2 | public function __construct(Reader $reader) |
|
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | 2 | public function getDefinition(string $class): Definition |
|
57 | |||
58 | /** |
||
59 | * Process relationship |
||
60 | * |
||
61 | * @param RelationshipAnnotation $annotation |
||
62 | * @param \ReflectionProperty $property |
||
63 | * @return Relationship |
||
64 | */ |
||
65 | 2 | protected function createRelationship(RelationshipAnnotation $annotation, \ReflectionProperty $property): Relationship |
|
85 | |||
86 | /** |
||
87 | * Handler getter of related object |
||
88 | * |
||
89 | * @param RelationshipAnnotation $annotation |
||
90 | * @param Relationship $relationship |
||
91 | */ |
||
92 | 2 | protected function handleGetter(RelationshipAnnotation $annotation, Relationship $relationship) |
|
104 | |||
105 | /** |
||
106 | * Handle identifier |
||
107 | * |
||
108 | * @param RelationshipAnnotation $annotation |
||
109 | * @param Relationship $relationship |
||
110 | */ |
||
111 | 2 | protected function handleIdentifier(RelationshipAnnotation $annotation, Relationship $relationship) |
|
125 | |||
126 | /** |
||
127 | * Resolve type of relationship |
||
128 | * |
||
129 | * @param RelationshipAnnotation $annotation |
||
130 | * @return int |
||
131 | */ |
||
132 | 2 | protected function resoleType(RelationshipAnnotation $annotation): int |
|
144 | } |