1 | <?php |
||
19 | class Annotation |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * The annotation token. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | |||
28 | protected $name; |
||
29 | |||
30 | /** |
||
31 | * Formmated arguments, but not casted. |
||
32 | * |
||
33 | * @var string[] |
||
34 | */ |
||
35 | |||
36 | protected $arguments; |
||
37 | |||
38 | /** |
||
39 | * @param string $name |
||
40 | * @param string $arguments |
||
41 | */ |
||
42 | |||
43 | public function __construct($name, $arguments) |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | |||
58 | public function getName() |
||
62 | |||
63 | /** |
||
64 | * @return array |
||
65 | */ |
||
66 | |||
67 | public function getArguments() |
||
71 | |||
72 | /** |
||
73 | * @param string $name |
||
74 | * @param string $default = null |
||
75 | * @return string |
||
76 | */ |
||
77 | |||
78 | public function getArgument($name, $default = null) |
||
82 | |||
83 | /** |
||
84 | * @return int |
||
85 | */ |
||
86 | |||
87 | public function getArgumentCount() |
||
91 | |||
92 | /** |
||
93 | * @param string $name |
||
94 | * @return boolean |
||
95 | */ |
||
96 | |||
97 | public function hasArgument($name) |
||
101 | |||
102 | /** |
||
103 | * Overwrite this method to parse and validate the arguments in a |
||
104 | * new Annotation definition. |
||
105 | * |
||
106 | * @return void |
||
107 | */ |
||
108 | |||
109 | protected function filter() |
||
113 | |||
114 | /** |
||
115 | * @return string |
||
116 | */ |
||
117 | |||
118 | public function __toString() |
||
126 | |||
127 | } |
||
128 |