Created
September 11, 2015 08:01
-
-
Save digitalkaoz/ac663650fc6131d295ac to your computer and use it in GitHub Desktop.
Symfony Closure Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$routes = new RouteCollection(); | |
$controller = function(Request $request) { | |
return new Response('foo'); | |
}; | |
$route = new Route('/foo', ['_controller' => $controller]); | |
$routes->add('foo_route', $route); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
throws
UndefinedMethodException in appDevUrlMatcher.php line xxx: Attempted to call an undefined method named "__set_state" of class "Closure".