Register the calculator class.

@return void
551867
protected function registerCalculator()
    {
        $this->app->singleton(TextSizeCalculatorInterface::class, function () {
            $path = __DIR__.'/../resources/fonts/DejaVuSans.ttf';

            return new GDTextSizeCalculator(realpath($path) ?: $path);
        });

        $this->app->singleton('badger.calculator', TextSizeCalculatorInterface::class);
    }
556615
public function register()
    {
        $this->app->singleton('fractal', function ($app, $arguments) {
            return fractal(...$arguments);
        });

        $this->app->alias('fractal', Fractal::class);
    }
317922
public function register()
    {
        foreach ($this->commands as $binding => $command) {
            $bind    = $this->prefix . $binding;
            $command = '\\' . $this->namespace . '\\' . $command . $this->commandSuffix;
            unset($this->commands[ $binding ]);
            $this->commands[ $bind ] = $command;
            $this->app->singleton($bind, $command);
        }

        $this->commands(array_keys($this->commands));
    }
1032755
public function register()
    {
        $this->registerLoader();

        $this->app->singleton('webklex.translator', function ($app) {
            return new Translator($app['webklex.translator.loader'], $app->getLocale());
        });
    }
621048
public function register()
    {
        $tokens = array();
        foreach ($this->newTypeCasts as $token => $versions) {
            if (\defined($token)) {
                $tokens[] = constant($token);
            }
        }

        /*
         * Work around tokenizer issues.
         *
         * - (binary) cast is incorrectly tokenized as T_STRING_CAST by PHP and PHPCS.
         * - b"something" binary cast is incorrectly tokenized as T_CONSTANT_ENCAPSED_STRING by PHP and PHPCS.
         * - Since PHPCS 3.4.0, PHPCS *will* tokenize these correctly.
         *
         * @link https://github.com/squizlabs/PHP_CodeSniffer/issues/1574
         */
        if (version_compare(PHPCSHelper::getVersion(), '3.4.0', '<') === true) {
            $tokens[] = \T_STRING_CAST;
            $tokens[] = \T_CONSTANT_ENCAPSED_STRING;
        }

        return $tokens;
    }
137789
public function register()
    {
        $this->commands('Kris\LaravelFormBuilder\Console\FormMakeCommand');

        $this->registerFormHelper();

        $this->app->bindShared('laravel-form-builder', function ($app) {

            return new FormBuilder($app, $app['laravel-form-helper']);
        });
    }
272207
public function register()
    {
        $chronos = new Chronos($this->app['config']);

        $this->app->instance('Marquine\Chronos\Chronos', $chronos);

        $this->app->alias(Chronos::class, 'chronos');

        AliasLoader::getInstance()->alias('Chronos', Facades\Chronos::class);
    }
967172
public function register()
    {
        $this->app->singleton('command.models.generate', function($app) {
            $db = $app['db.connection'];
            $driverClass = __NAMESPACE__.'\Drivers\\'.ucfirst($db->getDriverName()).'Driver';
            $driver = new $driverClass($db->getPdo());

            $builder = new Builder($app['config'], $driver);

            return new Console\GenerateCommand($builder);
        });

        $this->commands([
            'command.models.generate'
        ]);
    }
251372
public function registerClasses()
    {
        // Register user defined libraries in the DI container
        $aLibraries = $this->getOptionNames('dialogs.classes');
        foreach($aLibraries as $sShortName => $sFullName)
        {
            $this->registerLibrary($sShortName, $this->getOption($sFullName));
        }
    }
1269268
public function register()
    {
        $file = $this->app->make(Filesystem::class);
        $path    = realpath(__DIR__.'/../Helpers');
        $helpers = $file->glob($path.'/*.php');
        foreach ($helpers as $helper) 
        {
            require_once($helper);
        }
        $helpers = $file->glob($path.'/*/*.php');
        foreach ($helpers as $helper) 
        {
            require_once($helper);
        }
    }
417180
public function register()
    {
        // Set resolver for MySQL
        Connection::resolverFor('mysql', function ($connection, $database, $prefix = '', array $config = []) {
            $connection = new MySqlConnection($connection, $database, $prefix, $config);

            // Add Doctrine types for better support
            $this->addDoctrineTypes($connection);

            return $connection;
        });
    }
1335224
protected function registerBadger()
    {
        $this->app->singleton(Badger::class, function (Container $app) {
            $calculator = $app->make('badger.calculator');
            $path = realpath($raw = __DIR__.'/../resources/templates') ?: $raw;

            $renderers = [
                new PlasticRender($calculator, $path),
                new PlasticFlatRender($calculator, $path),
                new FlatSquareRender($calculator, $path),
                new SocialRender($calculator, $path),
            ];

            return new Badger($renderers);
        });

        $this->app->singleton('badger', Badger::class);
    }
169047
public function register()
    {
        $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'tactician');

        $this->registerLocator();
        $this->registerExtractor();
        $this->registerInflector();
        $this->registerCommandHandler();
        $this->registerMiddleware();
        $this->registerCommandBus();
        $this->registerDispatcher();
    }
1310759
public function register()
    {
        // Register main classes
        $this->app->make('Laraveldaily\Quickadmin\Controllers\QuickadminController');
        $this->app->make('Laraveldaily\Quickadmin\Controllers\UserActionsController');
        $this->app->make('Laraveldaily\Quickadmin\Controllers\QuickadminMenuController');
        $this->app->make('Laraveldaily\Quickadmin\Cache\QuickCache');
        $this->app->make('Laraveldaily\Quickadmin\Builders\MigrationBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Builders\ModelBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Builders\RequestBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Builders\ControllerBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Builders\ViewsBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Events\UserLoginEvents');
        // Register dependency packages
        $this->app->register('Collective\Html\HtmlServiceProvider');
        $this->app->register('Intervention\Image\ImageServiceProvider');
        $this->app->register('Yajra\Datatables\DatatablesServiceProvider');
        // Register dependancy aliases
        $loader = \Illuminate\Foundation\AliasLoader::getInstance();
        $loader->alias('HTML', 'Collective\Html\HtmlFacade');
        $loader->alias('Form', 'Collective\Html\FormFacade');
        $loader->alias('Image', 'Intervention\Image\Facades\Image');
        $loader->alias('Datatables', 'Yajra\Datatables\Datatables');
    }
534353
public function register()
    {
        $this->app->singleton('soda.menu.registrar', function ($app) {
            return new MenuRegistrar;
        });

        $this->app->singleton('soda.menu', function ($app) {
            return new MenuBuilder($app['soda.menu.registrar']);
        });
    }
950447
public function register()
    {
        // Set convention to use
        $this->app->bind(
                Convention::class,
                $this->resolveConventionClass(
                    $this->app->config->get('concord.convention', 'default')
                )
        );

        // Register interface -> actual class binding as singleton
        // For the sake of flexibility it's possible to replace
        // the actual class by setting `class` in the config
        $this->app->singleton(
            ConcordContract::class,
            $this->app->config->get('concord.class', Concord::class)
        );

        // Make an instance
        $concordInstance = $this->app->make(ConcordContract::class);
        // And make it available as the 'concord' service
        $this->app->instance('concord', $concordInstance);

        $this->registerCommands();

        $modules = config("concord.modules") ?: [];

        foreach ($modules as $key => $value) {
            $module = is_string($key) ? $key : $value;
            $config = is_array($value) ? $value : [];
            $concordInstance->registerModule($module, $config);
        }
    }
1152793
public function register()
    {
        /*
        |--------------------------------------------------------------------------
        | Providers
        |--------------------------------------------------------------------------
        */

        $this->app->register(\Collective\Html\HtmlServiceProvider::class);

        /*
        |--------------------------------------------------------------------------
        | Register the Utilities
        |--------------------------------------------------------------------------
        */

        $this->app->singleton('FormMaker', function () {
            return new FormMaker();
        });

        $this->app->singleton('InputMaker', function () {
            return new InputMaker();
        });

        $loader = AliasLoader::getInstance();

        $loader->alias('FormMaker', \Grafite\FormMaker\Facades\FormMaker::class);
        $loader->alias('InputMaker', \Grafite\FormMaker\Facades\InputMaker::class);

        // Thrid party
        $loader->alias('Form', \Collective\Html\FormFacade::class);
        $loader->alias('HTML', \Collective\Html\HtmlFacade::class);

        /*
        |--------------------------------------------------------------------------
        | Blade Directives
        |--------------------------------------------------------------------------
        */

        // Form Maker
        Blade::directive('form_maker_table', function ($expression) {
            return "<?php echo FormMaker::fromTable($expression); ?>";
        });

        Blade::directive('form_maker_array', function ($expression) {
            return "<?php echo FormMaker::fromArray($expression); ?>";
        });

        Blade::directive('form_maker_object', function ($expression) {
            return "<?php echo FormMaker::fromObject($expression); ?>";
        });

        Blade::directive('form_maker_columns', function ($expression) {
            return "<?php echo FormMaker::getTableColumns($expression); ?>";
        });

        // Label Maker
        Blade::directive('input_maker_label', function ($expression) {
            return "<?php echo InputMaker::label($expression); ?>";
        });

        Blade::directive('input_maker_create', function ($expression) {
            return "<?php echo InputMaker::create($expression); ?>";
        });
    }