Total Complexity | 4 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | abstract class EdmVocabularyAnnotation extends EdmElement implements IVocabularyAnnotation |
||
17 | { |
||
18 | use VocabularyAnnotationHelpers; |
||
19 | |||
20 | /** |
||
21 | * @var IVocabularyAnnotatable |
||
22 | */ |
||
23 | private $target; |
||
24 | /** |
||
25 | * @var ITerm |
||
26 | */ |
||
27 | private $term; |
||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $qualifier; |
||
32 | |||
33 | /** |
||
34 | * Initializes a new instance of the EdmVocabularyAnnotation class. |
||
35 | * @param IVocabularyAnnotatable $target Element the annotation applies to. |
||
36 | * @param ITerm $term Term bound by the annotation. |
||
37 | * @param string $qualifier Qualifier used to discriminate between multiple bindings of the same property or type. |
||
38 | */ |
||
39 | protected function __construct(IVocabularyAnnotatable $target, ITerm $term, ?string $qualifier) |
||
40 | { |
||
41 | $this->target = $target; |
||
42 | $this->term = $term; |
||
43 | $this->qualifier = $qualifier; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @inheritDoc |
||
48 | */ |
||
49 | public function getQualifier(): ?string |
||
50 | { |
||
51 | return $this->qualifier; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @inheritDoc |
||
56 | */ |
||
57 | public function getTerm(): ITerm |
||
58 | { |
||
59 | return $this->term; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @inheritDoc |
||
64 | */ |
||
65 | public function getTarget(): IVocabularyAnnotatable |
||
68 | } |
||
69 | |||
70 | } |