Created
November 27, 2012 07:41
-
-
Save bobagold/4152987 to your computer and use it in GitHub Desktop.
Oppa js style (silex-based skeleton without unintended global variables
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 | |
| return call_user_func(function() { | |
| $app = new \Silex\Application(); | |
| $routes = require(__DIR__ . '/routes.php'); | |
| $routes($app); | |
| return $app; | |
| }); |
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 | |
| use \Symfony\Component\HttpFoundation\Response; | |
| return function(\Silex\Application $app) { | |
| $app->get('/', function() { | |
| return new Response(''); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment