SilexAssetic\AsseticServiceProvider::boot PHP Method

boot() public method

Bootstraps the application.
public boot ( Silex\Application $app )
$app Silex\Application The application
    public function boot(Application $app)
    {
        // Register our filters to use
        if (isset($app['assetic.filters']) && is_callable($app['assetic.filters'])) {
            $app['assetic.filters']($app['assetic.filter_manager']);
        }
        /**
         * Writes down all lazy asset manager and asset managers assets
         */
        $app->after(function () use($app) {
            // Boot assetic
            $assetic = $app['assetic'];
            if (!isset($app['assetic.options']['auto_dump_assets']) || !$app['assetic.options']['auto_dump_assets']) {
                return;
            }
            $helper = $app['assetic.dumper'];
            if (isset($app['twig'])) {
                $helper->addTwigAssets();
            }
            $helper->dumpAssets();
        });
    }
AsseticServiceProvider