| @@ 295-316 (lines=22) @@ | ||
| 292 | * |
|
| 293 | * @return boolean |
|
| 294 | */ |
|
| 295 | public function processRequest() |
|
| 296 | { |
|
| 297 | if(!$this->canProcessRequest()) |
|
| 298 | { |
|
| 299 | return false; |
|
| 300 | } |
|
| 301 | ||
| 302 | $aArgs = $this->getRequestManager()->process(); |
|
| 303 | ||
| 304 | // Find the requested method |
|
| 305 | $xCallableObject = $this->getCallableObject($this->sRequestedClass); |
|
| 306 | if(!$xCallableObject || !$xCallableObject->hasMethod($this->sRequestedMethod)) |
|
| 307 | { |
|
| 308 | // Unable to find the requested object or method |
|
| 309 | throw new \Jaxon\Exception\Error($this->trans('errors.objects.invalid', |
|
| 310 | ['class' => $this->sRequestedClass, 'method' => $this->sRequestedMethod])); |
|
| 311 | } |
|
| 312 | ||
| 313 | // Call the requested method |
|
| 314 | $xCallableObject->call($this->sRequestedMethod, $aArgs); |
|
| 315 | return true; |
|
| 316 | } |
|
| 317 | } |
|
| 318 | ||
| @@ 481-502 (lines=22) @@ | ||
| 478 | * |
|
| 479 | * @return boolean |
|
| 480 | */ |
|
| 481 | public function processRequest() |
|
| 482 | { |
|
| 483 | if(!$this->canProcessRequest()) |
|
| 484 | { |
|
| 485 | return false; |
|
| 486 | } |
|
| 487 | ||
| 488 | $aArgs = $this->getRequestManager()->process(); |
|
| 489 | ||
| 490 | // Find the requested method |
|
| 491 | $xCallableObject = $this->getCallableObject($this->sRequestedClass); |
|
| 492 | if(!$xCallableObject || !$xCallableObject->hasMethod($this->sRequestedMethod)) |
|
| 493 | { |
|
| 494 | // Unable to find the requested object or method |
|
| 495 | throw new \Jaxon\Exception\Error($this->trans('errors.objects.invalid', |
|
| 496 | ['class' => $this->sRequestedClass, 'method' => $this->sRequestedMethod])); |
|
| 497 | } |
|
| 498 | ||
| 499 | // Call the requested method |
|
| 500 | $xCallableObject->call($this->sRequestedMethod, $aArgs); |
|
| 501 | return true; |
|
| 502 | } |
|
| 503 | } |
|
| 504 | ||