public static function getSubscribedEvents() { return [ 'Enlight_Controller_Action_PostDispatchSecure_Frontend' => 'onPostDispatchSecure', ]; }
public function onPostDispatchSecure(\Enlight_Controller_ActionEventArgs $args){ $controller = $args->getSubject(); // $controller Shopware_Controllers_Frontend_Index $request = $controller->Request(); // $request Controller_Request_Http $response = $controller->Response(); // Controller_Response_Http $view = $controller->View(); // $view Enlight_View_Default $requestData = [ 'moduleName' => $controller->Request()->getModuleName(), 'controllerName' => $controller->Request()->getControllerName(), 'actionName' => $controller->Request()->getActionName(), 'httpMethod' => $controller->Request()->getMethod(), 'params' => $controller->Request()->getParams(), 'get' => $controller->Request()->getQuery(), 'post' => $controller->Request()->getPost(), 'cookies' => $controller->Request()->getCookie(), 'uri' => $controller->Request()->getRequestUri(), 'url' => ($controller->Request()->isSecure() ? 'https' : 'http') . '://' . $this->container->get('shop')->getHost() . $this->container->get('shop')->getBaseUrl() . $controller->Request()->getRequestUri(), 'ip' => $controller->Request()->getClientIp(), 'time' => time(), ]; echo '<pre>'; echo __FILE__.':'.__LINE__.'<br />'; print_r($requestData); echo '</pre>'; }