| @@ 246-264 (lines=19) @@ | ||
| 243 | { |
|
| 244 | if (!empty($data['path']) && $uri === $data['path']) { |
|
| 245 | ||
| 246 | if ($this->requestType === 'default' && in_array($this->request->getMethod(), $data['method'])) { |
|
| 247 | ||
| 248 | return [ |
|
| 249 | $data['controller'], |
|
| 250 | $data['action'] . 'Action', |
|
| 251 | $data['permission'] ?? null, |
|
| 252 | [] |
|
| 253 | ]; |
|
| 254 | ||
| 255 | } else if ($this->requestType === 'api') { |
|
| 256 | ||
| 257 | return [ |
|
| 258 | $data['controller'], |
|
| 259 | $this->_getRestfulAction(), |
|
| 260 | $data['permission'] ?? null, |
|
| 261 | [] |
|
| 262 | ]; |
|
| 263 | ||
| 264 | } |
|
| 265 | ||
| 266 | throw new MethodNotFoundException('Non valid request method available.'); |
|
| 267 | ||
| @@ 295-313 (lines=19) @@ | ||
| 292 | ||
| 293 | array_splice($var, 0, 1); |
|
| 294 | ||
| 295 | if ($this->requestType === 'default' && in_array($this->request->getMethod(), $data['method'])) { |
|
| 296 | ||
| 297 | return [ |
|
| 298 | $data['controller'], |
|
| 299 | $data['action'] . 'Action', |
|
| 300 | $data['permission'] ?? null, |
|
| 301 | $var |
|
| 302 | ]; |
|
| 303 | ||
| 304 | } else if ($this->requestType === 'api') { |
|
| 305 | ||
| 306 | return [ |
|
| 307 | $data['controller'], |
|
| 308 | $this->_getRestfulAction(), |
|
| 309 | $data['permission'] ?? null, |
|
| 310 | $var |
|
| 311 | ]; |
|
| 312 | ||
| 313 | } |
|
| 314 | ||
| 315 | } |
|
| 316 | ||