Created
June 22, 2012 15:41
-
-
Save delorenj/2973561 to your computer and use it in GitHub Desktop.
compile fos_js_routing_js callback into static js for use with assetic
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 | |
require_once __DIR__.'/../app/bootstrap.php.cache'; | |
require_once __DIR__.'/../app/AppKernel.php'; | |
use Symfony\Component\HttpFoundation\Request; | |
$kernel = new AppKernel('stage', false); | |
$kernel->loadClassCache(); | |
$response = $kernel->handle(Request::create('/js/routing?callback=fos.Router.setData')); | |
file_put_contents(__DIR__.'/../web/js/routes.js', $response->getContent()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment