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.

38 lines
700 B

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