<?php
|
|
|
|
namespace App\Handlers\Response;
|
|
|
|
/**
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
class ResponseHandler implements ResponseHandlerInterface
|
|
{
|
|
// response
|
|
protected $response;
|
|
|
|
//
|
|
protected $source;
|
|
|
|
/**
|
|
*
|
|
* @param [type] $actions
|
|
*
|
|
*/
|
|
public function __construct($source)
|
|
{
|
|
$this->source = $source;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param [type] $data
|
|
* @return [type]
|
|
*/
|
|
protected function processActions($data)
|
|
{
|
|
foreach($this->source->actions() as $action) {
|
|
HandlerFactory::getActionHandlerClass($action->action_handler_class);
|
|
$action = new ActionClass($this->source, $this->response, $data);
|
|
$action->run();
|
|
}
|
|
}
|
|
}
|