Bolt\Provider\ControllerServiceProvider::register PHP Method

register() public method

public register ( Silex\Application $app )
$app Silex\Application
    public function register(Application $app)
    {
        if (!isset($app['controller.backend.mount_prefix'])) {
            $app['controller.backend.mount_prefix'] = function ($app) {
                return $app['config']->get('general/branding/path');
            };
        }
        if (!isset($app['controller.async.mount_prefix'])) {
            $app['controller.async.mount_prefix'] = '/async';
        }
        if (!isset($app['controller.backend.extend.mount_prefix'])) {
            $app['controller.backend.extend.mount_prefix'] = function ($app) {
                return $app['config']->get('general/branding/path') . '/extend';
            };
        }
        if (!isset($app['controller.backend.upload.mount_prefix'])) {
            $app['controller.backend.upload.mount_prefix'] = function ($app) {
                return $app['config']->get('general/branding/path') . '/upload';
            };
        }
        $app['controller.backend.authentication'] = $app->share(function () {
            return new Controller\Backend\Authentication();
        });
        $app['controller.backend.extend'] = $app->share(function () {
            return new Controller\Backend\Extend();
        });
        $app['controller.backend.database'] = $app->share(function () {
            return new Controller\Backend\Database();
        });
        $app['controller.backend.file_manager'] = $app->share(function () {
            return new Controller\Backend\FileManager();
        });
        $app['controller.backend.general'] = $app->share(function () {
            return new Controller\Backend\General();
        });
        $app['controller.backend.log'] = $app->share(function () {
            return new Controller\Backend\Log();
        });
        $app['controller.backend.records'] = $app->share(function () {
            return new Controller\Backend\Records();
        });
        $app['controller.backend.upload'] = $app->share(function () {
            return new Controller\Backend\Upload();
        });
        $app['controller.backend.users'] = $app->share(function () {
            return new Controller\Backend\Users();
        });
        $app['controller.async.general'] = $app->share(function () {
            return new Controller\Async\General();
        });
        $app['controller.async.filesystem_manager'] = $app->share(function () {
            return new Controller\Async\FilesystemManager();
        });
        $app['controller.async.records'] = $app->share(function () {
            return new Controller\Async\Records();
        });
        $app['controller.async.stack'] = $app->share(function () {
            return new Controller\Async\Stack();
        });
        $app['controller.async.system_checks'] = $app->share(function () {
            return new Controller\Async\SystemChecks();
        });
        $app['controller.async.widget'] = $app->share(function () {
            return new Controller\Async\Widget();
        });
        $app['controller.exception'] = $app->share(function () {
            return new Controller\Exception();
        });
        $app['controller.frontend'] = $app->share(function () {
            return new Controller\Frontend();
        });
        $app['controller.requirement'] = $app->share(function ($app) {
            return new Controller\Requirement($app['config']);
        });
        $app['controller.requirement.deprecated'] = $app->share(function ($app) {
            return new Controller\Routing($app['config']);
        });
        $app['controller.classmap'] = ['Bolt\\Controllers\\Frontend' => 'controller.frontend', 'Bolt\\Controllers\\Routing' => 'controller.requirement.deprecated'];
    }