Total Complexity | 2 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | abstract class AbstractAnnotation extends Annotation implements IAnnotationParser |
||
22 | { |
||
23 | /** |
||
24 | * @var AnnotationReader |
||
25 | */ |
||
26 | protected $xReader; |
||
27 | |||
28 | /** |
||
29 | * @var mixed |
||
30 | */ |
||
31 | protected $xPrevValue = null; |
||
32 | |||
33 | /** |
||
34 | * @param AnnotationReader $xReader |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | public function setReader(AnnotationReader $xReader): void |
||
39 | { |
||
40 | $this->xReader = $xReader; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Set the attribute previous value |
||
45 | * |
||
46 | * @param mixed $xPrevValue The previous value of the attribute |
||
47 | * |
||
48 | * @return void |
||
49 | */ |
||
50 | public function setPrevValue($xPrevValue): void |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * Get the annotation name |
||
57 | * |
||
58 | * This is usually the corresponding option name in the Jaxon config. |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | abstract public function getName(): string; |
||
63 | |||
64 | /** |
||
65 | * Get the annotation value |
||
66 | * |
||
67 | * For attributes with multiple values, the previous value needs to be merged with the current. |
||
68 | * |
||
69 | * @return mixed |
||
70 | */ |
||
71 | abstract public function getValue(); |
||
72 | } |
||
73 |