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