/** * Register the asset manager itself, which is responsible for holding all * assets and compiling them. * * @return void */ protected function registerAssetManager() { // The assets and views parts actually take the theme bag as // their dependencies. They do this so that all themes in // the bag may be used when finding views and assets. $me = $this; $this->app['theme.assets'] = $this->app->share(function ($app) use($me) { $publicPath = $app['path.public']; $config = $app['config']->get('cartalyst.themes'); $manager = new AssetManager($app['themes'], $app['view.finder'], $app['theme.locations']); $manager->setDebug($me->guessDebug()); $manager->setCachePath(array_get($config, 'cache_path', null)); foreach (array_get($config, 'filters', array()) as $extension => $filters) { foreach ($filters as $filter) { $manager->addFilter($extension, $filter); } } $manager->setForceRecompile(array_get($config, 'force_recompile', false)); $manager->clearAssets(array_get($config, 'auto_clear', false)); return $manager; }); }