1 | <?php |
||
12 | class LinksRelation extends AbstractRelation implements RelationInterface |
||
13 | { |
||
14 | /** |
||
15 | * {@inheritdoc} |
||
16 | */ |
||
17 | public function getName() |
||
21 | |||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function getRelation($resource) |
||
44 | |||
45 | /** |
||
46 | * @param \ReflectionProperty $property |
||
47 | * @param object $relationContent |
||
48 | * @return string|null |
||
49 | * @throws \Doctrine\ORM\Mapping\MappingException |
||
50 | */ |
||
51 | protected function getRelationLink($property, $relationContent) |
||
68 | |||
69 | /** |
||
70 | * Get the url of an entity based on the 'get_entity' route pattern. |
||
71 | * |
||
72 | * @param $resource |
||
73 | * @param \ReflectionClass $reflectionClass |
||
74 | * |
||
75 | * @return array|null |
||
76 | */ |
||
77 | private function getSelfLink($resource, $reflectionClass) |
||
90 | |||
91 | /** |
||
92 | * Get the links of a collection. |
||
93 | * |
||
94 | * @param \ReflectionProperty $property |
||
95 | * @param $relationContent |
||
96 | * |
||
97 | * @return array|void |
||
98 | */ |
||
99 | private function getRelationLinks($property, $relationContent) |
||
112 | |||
113 | /** |
||
114 | * Returns entity single identifier. |
||
115 | * This is a compatibility-limiting feature as it will not be able to get the identity |
||
116 | * of an entity which has multiple identifiers. |
||
117 | * @param $entity |
||
118 | */ |
||
119 | private function getEntityId($entity) |
||
127 | } |
||
128 |