GIST is an open-source application to share code. https://gist.deblan.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ControllerResolver.php 460B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Gist;
  3. use Silex\ControllerResolver as BaseControllerResolver;
  4. /**
  5. * Class DecoratorControllerResolver.
  6. *
  7. * @author Simon Vieille <simon@deblan.fr>
  8. */
  9. class ControllerResolver extends BaseControllerResolver
  10. {
  11. /**
  12. * Instanciates a controller.
  13. *
  14. * @param string $class
  15. *
  16. * @return Gist\Controller
  17. */
  18. protected function instantiateController($class)
  19. {
  20. return new $class($this->app);
  21. }
  22. }