response = Http::withHeaders([ "Content-Type" => "text/xml;charset=utf-8" ])->get($this->source->url); return $this->response; } /** * handle response * * * */ public function run() { $xml = new SimpleXMLElement($this->response->body()); foreach($xml->channel->item as $item) { foreach($this->actions as $action) { $actionClass = $action->action_handler_class; $action = new ActionClass($item); $action->run(); } } } }