Skip to content

Instantly share code, notes, and snippets.

@anvodev
Created May 3, 2020 17:29
Show Gist options
  • Select an option

  • Save anvodev/0668dceef15e13a0daeefe568b8ade68 to your computer and use it in GitHub Desktop.

Select an option

Save anvodev/0668dceef15e13a0daeefe568b8ade68 to your computer and use it in GitHub Desktop.
Load controller stage
<?php
//...
// load controller
if (false === $controller = $this->resolver->getController($request)) {
throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo()));
}
$event = new ControllerEvent($this, $controller, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER);
$controller = $event->getController();
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment