* Plugin our http (http) class * * you can access this plugin by using * $bolt['http'] * */ $bolt->plug('http', 'bolt\\http'); /** * Plugin the components we need for * our http instance */ $bolt['http']->plug([['assets', 'bolt\\http\\assets', ['root' => 'assets', 'path' => '/a/{path}', 'filters' => ['css' => [new Assetic\Filter\LessphpFilter()]], 'ready' => function ($assets) { $assets->set('app', $assets->collection([new Assetic\Asset\HttpAsset('http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css'), new Assetic\Asset\HttpAsset('http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css'), $assets->glob('css/*css')])); }]], ['router', 'bolt\\http\\router'], ['views', 'bolt\\http\\views', ['dirs' => ['views'], 'engines' => [['hbr', 'bolt\\render\\handlebars']]]]]); /** * if we in dev, we want to autoload * all of our controllers with route * definitions */ $bolt->env('dev', function () { $this['http']['router']->loadFromControllers([b::fs('rdir', $this->path('/controllers'), '^.+\\.php$')]); }); /** * we want to plugin our cli functions * give it a try: `./bolt app:test 'hello world' --yell` */ $bolt->plug('cli', 'bolt\\cli')['cli']->plug('test', 'app\\cli\\test'); /** * return our runnable instance */ return $bolt;