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 Definition |
||
64 | */ |
||
65 | 2 | protected function createRelationship(RelationshipAnnotation $annotation, \ReflectionProperty $property): Relationship |
|
89 | |||
90 | /** |
||
91 | * Handle identifier |
||
92 | * |
||
93 | * @param RelationshipAnnotation $annotation |
||
94 | * @param Relationship $relationship |
||
95 | */ |
||
96 | 2 | protected function handleIdentifier(RelationshipAnnotation $annotation, Relationship $relationship) |
|
110 | |||
111 | /** |
||
112 | * Resolve type of relationship |
||
113 | * |
||
114 | * @param RelationshipAnnotation $annotation |
||
115 | * @return int |
||
116 | */ |
||
117 | 2 | protected function resoleType(RelationshipAnnotation $annotation): int |
|
129 | } |