1 | <?php |
||
15 | class RelationshipProcessor extends AbstractProcessor |
||
16 | { |
||
17 | /** |
||
18 | * Process properties of class |
||
19 | * |
||
20 | * @param \ReflectionClass $reflection |
||
21 | * @param Definition $definition |
||
22 | */ |
||
23 | 4 | public function process(\ReflectionClass $reflection, Definition $definition) |
|
30 | |||
31 | /** |
||
32 | * Process property of class |
||
33 | * |
||
34 | * @param \ReflectionProperty $property |
||
35 | * @param Definition $definition |
||
36 | */ |
||
37 | 4 | protected function processProperty(\ReflectionProperty $property, Definition $definition) |
|
50 | |||
51 | /** |
||
52 | * Process relationship |
||
53 | * |
||
54 | * @param RelationshipAnnotation $annotation |
||
55 | * @param \ReflectionProperty $property |
||
56 | * @return Relationship |
||
57 | */ |
||
58 | 4 | protected function createRelationship(RelationshipAnnotation $annotation, \ReflectionProperty $property): Relationship |
|
78 | |||
79 | /** |
||
80 | * Handle links |
||
81 | * |
||
82 | * @param RelationshipAnnotation $annotation |
||
83 | * @param Relationship $relationship |
||
84 | */ |
||
85 | 4 | protected function handleLinks(RelationshipAnnotation $annotation, Relationship $relationship) |
|
94 | |||
95 | /** |
||
96 | * Handle control of data-section |
||
97 | * |
||
98 | * @param RelationshipAnnotation $annotation |
||
99 | * @param Relationship $relationship |
||
100 | */ |
||
101 | 4 | protected function handleDataControl(RelationshipAnnotation $annotation, Relationship $relationship) |
|
106 | |||
107 | /** |
||
108 | * Resolve type of relationship |
||
109 | * |
||
110 | * @param RelationshipAnnotation $annotation |
||
111 | * @return int |
||
112 | */ |
||
113 | 4 | protected function resolveType(RelationshipAnnotation $annotation): int |
|
125 | } |