You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
725 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <?php
  2. namespace App\Handlers\Response;
  3. /**
  4. *
  5. *
  6. *
  7. */
  8. class ResponseHandler implements ResponseHandlerInterface
  9. {
  10. // response
  11. protected $response;
  12. //
  13. protected $source;
  14. /**
  15. *
  16. * @param [type] $actions
  17. *
  18. */
  19. public function __construct($source)
  20. {
  21. $this->source = $source;
  22. }
  23. /**
  24. *
  25. * @param [type] $data
  26. * @return [type]
  27. */
  28. protected function processActions($data)
  29. {
  30. foreach($this->source->actions() as $action) {
  31. HandlerFactory::getActionHandlerClass($action->action_handler_class);
  32. $action = new ActionClass($this->source, $this->response, $data);
  33. $action->run();
  34. }
  35. }
  36. }