<?php
|
|
|
|
namespace App\Handlers\Actions;
|
|
|
|
/**
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
|
|
class ActionHandler implements ActionHandlerInterface
|
|
{
|
|
// data to process in a action
|
|
protected $data;
|
|
|
|
/**
|
|
*
|
|
* @param [type] $data
|
|
* @return [type]
|
|
*/
|
|
protected function processActions($source, $response, $data)
|
|
{
|
|
foreach($this->source->actions() as $action) {
|
|
HandlerFactory::getActionHandlerClass($action->response_handler_class);
|
|
$action = new ActionClass($this->source, $data);
|
|
$action->run();
|
|
}
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param mixed $data
|
|
*
|
|
*/
|
|
public function __construct($data)
|
|
{
|
|
$this->data = $data;
|
|
}
|
|
}
|