1 | <?php |
||
38 | class PathDescriptor extends AbstractNameAwareDescriptor implements PathDescriptorInterface |
||
39 | { |
||
40 | |||
41 | /** |
||
42 | * The trait with the references descriptors. |
||
43 | * |
||
44 | * @var AppserverIo\Description\DescriptorReferencesTrait |
||
45 | */ |
||
46 | use DescriptorReferencesTrait; |
||
47 | |||
48 | /** |
||
49 | * The beans class name. |
||
50 | * |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $className; |
||
54 | |||
55 | /** |
||
56 | * The array with the action methods. |
||
57 | * |
||
58 | * @var array |
||
59 | */ |
||
60 | protected $actions = array(); |
||
61 | |||
62 | /** |
||
63 | * The array with the action results. |
||
64 | * |
||
65 | * @var array |
||
66 | */ |
||
67 | protected $results = array(); |
||
68 | |||
69 | /** |
||
70 | * Sets the beans class name. |
||
71 | * |
||
72 | * @param string $className The beans class name |
||
73 | * |
||
74 | * @return void |
||
75 | */ |
||
76 | 4 | public function setClassName($className) |
|
77 | { |
||
78 | 4 | $this->className = $className; |
|
79 | 4 | } |
|
80 | |||
81 | /** |
||
82 | * Returns the beans class name. |
||
83 | * |
||
84 | * @return string The beans class name |
||
85 | */ |
||
86 | 2 | public function getClassName() |
|
87 | { |
||
88 | 2 | return $this->className; |
|
89 | } |
||
90 | |||
91 | /** |
||
92 | * Adds a action method configuration. |
||
93 | * |
||
94 | * @param \AppserverIo\Routlt\Description\ActionDescriptorInterface $action The action method configuration |
||
95 | * |
||
96 | * @return void |
||
97 | */ |
||
98 | 4 | public function addAction(ActionDescriptorInterface $action) |
|
109 | |||
110 | /** |
||
111 | * Sets the array with the action methods. |
||
112 | * |
||
113 | * @param array $actions The action methods |
||
114 | * |
||
115 | * @return void |
||
116 | */ |
||
117 | 1 | public function setActions(array $actions) |
|
121 | |||
122 | /** |
||
123 | * The array with the action methods. |
||
124 | * |
||
125 | * @return array The action methods |
||
126 | */ |
||
127 | 2 | public function getActions() |
|
131 | |||
132 | /** |
||
133 | * Adds a result action configuration. |
||
134 | * |
||
135 | * @param \AppserverIo\Routlt\Description\ResultConfigurationDescriptorInterface $result The action result configuration |
||
136 | * |
||
137 | * @return void |
||
138 | */ |
||
139 | 3 | public function addResult(ResultConfigurationDescriptorInterface $result) |
|
143 | |||
144 | /** |
||
145 | * Sets the array with the action results. |
||
146 | * |
||
147 | * @param array $results The action results |
||
148 | * |
||
149 | * @return void |
||
150 | */ |
||
151 | 1 | public function setResults(array $results) |
|
155 | |||
156 | /** |
||
157 | * The array with the action results. |
||
158 | * |
||
159 | * @return array The action results |
||
160 | */ |
||
161 | 2 | public function getResults() |
|
165 | |||
166 | /** |
||
167 | * Returns a new descriptor instance. |
||
168 | * |
||
169 | * @return \AppserverIo\Routlt\Description\PathDescriptorInterface The descriptor instance |
||
170 | */ |
||
171 | 1 | public static function newDescriptorInstance() |
|
175 | |||
176 | /** |
||
177 | * Returns a new annotation instance for the passed reflection class. |
||
178 | * |
||
179 | * @param \AppserverIo\Lang\Reflection\ClassInterface $reflectionClass The reflection class with the bean configuration |
||
180 | * |
||
181 | * @return \AppserverIo\Lang\Reflection\AnnotationInterface The reflection annotation |
||
182 | */ |
||
183 | protected function newAnnotationInstance(ClassInterface $reflectionClass) |
||
187 | |||
188 | /** |
||
189 | * Initializes the bean configuration instance from the passed reflection class instance. |
||
190 | * |
||
191 | * @param \AppserverIo\Lang\Reflection\ClassInterface $reflectionClass The reflection class with the bean configuration |
||
192 | * |
||
193 | * @return \AppserverIo\Routlt\Description\PathDescriptorInterface The initialized descriptor |
||
194 | */ |
||
195 | 6 | public function fromReflectionClass(ClassInterface $reflectionClass) |
|
249 | |||
250 | /** |
||
251 | * Initializes a bean configuration instance from the passed deployment descriptor node. |
||
252 | * |
||
253 | * @param \SimpleXmlElement $node The deployment node with the bean configuration |
||
254 | * |
||
255 | * @return \AppserverIo\Routlt\Description\PathDescriptorInterface The initialized descriptor |
||
256 | */ |
||
257 | 1 | public function fromDeploymentDescriptor(\SimpleXmlElement $node) |
|
260 | |||
261 | /** |
||
262 | * Initializes a bean configuration instance from the passed configuration node. |
||
263 | * |
||
264 | * @param \AppserverIo\Configuration\Interfaces\NodeInterface $node The configuration node with the bean configuration |
||
265 | * |
||
266 | * @return \AppserverIo\Routlt\Description\PathDescriptorInterface The initialized descriptor |
||
267 | */ |
||
268 | public function fromConfiguration(NodeInterface $node) |
||
271 | |||
272 | /** |
||
273 | * Merges the passed configuration into this one. Configuration values |
||
274 | * of the passed configuration will overwrite the this one. |
||
275 | * |
||
276 | * @param \AppserverIo\Routlt\Description\PathDescriptorInterface $pathDescriptor The configuration to merge |
||
277 | * |
||
278 | * @return void |
||
279 | * @throws \AppserverIo\Routlt\Description\DescriptorException Is thrown if the passed descriptor has a different class name |
||
280 | */ |
||
281 | 2 | public function merge(PathDescriptorInterface $pathDescriptor) |
|
319 | } |
||
320 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.