Resolve "Auto-assign hub and rider" #1231

Merged
korina.cordero merged 22 commits from 374-auto-assign-hub-and-rider into master 2020-04-15 03:34:58 +00:00
Showing only changes of commit 63bb887370 - Show all commits

View file

@ -13,24 +13,29 @@ class LogSubscriber implements EventSubscriberInterface
{ {
protected $allow; protected $allow;
public function __construct()
{
$this->allow = true;
}
public function onKernelController(ControllerEvent $event) public function onKernelController(ControllerEvent $event)
{ {
$controller = $event->getController(); $controller = $event->getController();
$this->allow = false;
// when a controller class defines multiple action methods, the controller // when a controller class defines multiple action methods, the controller
// is returned as [$controllerInstance, 'methodName'] // is returned as [$controllerInstance, 'methodName']
if (is_array($controller)) if (is_array($controller))
$controller = $controller[0]; $controller = $controller[0];
if ($controller instanceof LoggedController) if (!($controller instanceof LoggedController))
$this->allow = true; return;
else
$this->allow = false; $this->allow = true;
$req = $event->getRequest();
$reqdata = [
$req->getPathInfo(),
$req->getMethod(),
$req->query->all(),
$req->request->all(),
];
error_log(print_r($req_data, true));
} }
public function onKernelResponse(ResponseEvent $event) public function onKernelResponse(ResponseEvent $event)