Bind the interfaces to their implementations.

@param \Illuminate\Contracts\Foundation\Application $app

@return void
184657
public function registerInterfaceBindings(Application $app)
    {
        $app->bind(ClientInterface::class, FluentClient::class);
        $app->bind(ScopeInterface::class, FluentScope::class);
        $app->bind(SessionInterface::class, FluentSession::class);
        $app->bind(AuthCodeInterface::class, FluentAuthCode::class);
        $app->bind(AccessTokenInterface::class, FluentAccessToken::class);
        $app->bind(RefreshTokenInterface::class, FluentRefreshToken::class);
    }
230235
public function bootstrap(Application $app)
	{
		$url = $app['config']->get('app.url', 'http://localhost');

		$app->instance('request', Request::create($url, 'GET', [], [], [], $_SERVER));
	}
940431
public function refreshApplication($app = null)
    {
        $this->app = $app instanceof Application ? $app : $this->createApplication();
    }
972075
public function register(Application $App) {
        $App->addCommand(new \YourApp\Command\Foo());
        $App->addCommand(new \YourApp\Command\Bar());
        $App->addCommand(new \YourApp\Command\Baz());
    }
52430
protected function registerMapperInitializer(Application $app)
    {
        $initializer = function ($mapper, $app) {
            $mapper->setSqlFactory(new SqlFactory);
        };

        $app->initializer('Synapse\Mapper\AbstractMapper', $initializer);
    }
663366
public function register() {

		$this->app->bind( Attributes::class, Attr::class );

		$this->app->alias( Attributes::class, 'attr' );
	}
1272014
protected function setupInterfaces()
    {
        // Bind the Auth Repository Interface
        $this->app->bind(
          'Laraflock\Dashboard\Repositories\Auth\AuthRepositoryInterface',
          config('laraflock.dashboard.authRepositoryClass')
        );

        // Bind the Permission Repository Interface
        $this->app->bind(
          'Laraflock\Dashboard\Repositories\Permission\PermissionRepositoryInterface',
          config('laraflock.dashboard.permissionRepositoryClass')
        );

        // Bind the Role Repository Interface
        $this->app->bind(
          'Laraflock\Dashboard\Repositories\Role\RoleRepositoryInterface',
          config('laraflock.dashboard.roleRepositoryClass')
        );

        // Bind the User Repository Interface
        $this->app->bind(
          'Laraflock\Dashboard\Repositories\User\UserRepositoryInterface',
          config('laraflock.dashboard.userRepositoryClass')
        );

        // Bind the Module Repository Interface
        $this->app->singleton(
            'Laraflock\Dashboard\Repositories\Module\ModuleRepositoryInterface',
            config('laraflock.dashboard.moduleRepositoryClass')
        );
    }
1343460
public function registerStorageBindings(Application $app)
    {
        $provider = $this;

        $app->singleton(FluentAccessToken::class, function () use ($provider) {
            $storage = new FluentAccessToken($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentAuthCode::class, function () use ($provider) {
            $storage = new FluentAuthCode($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentClient::class, function ($app) use ($provider) {
            $limitClientsToGrants = $app['config']->get('oauth2.limit_clients_to_grants');
            $storage = new FluentClient($provider->app['db'], $limitClientsToGrants);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentRefreshToken::class, function () use ($provider) {
            $storage = new FluentRefreshToken($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentScope::class, function ($app) use ($provider) {
            $limitClientsToScopes = $app['config']->get('oauth2.limit_clients_to_scopes');
            $limitScopesToGrants = $app['config']->get('oauth2.limit_scopes_to_grants');
            $storage = new FluentScope($provider->app['db'], $limitClientsToScopes, $limitScopesToGrants);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentSession::class, function () use ($provider) {
            $storage = new FluentSession($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });
    }
403208
public function bootstrap($app)
    {
        $app->on(Application::EVENT_BEFORE_REQUEST, function () {
            $this->retrieveInfo();
            $this->retrieveLanguageFromGeo();
        });
        $app->on(Application::EVENT_BEFORE_ACTION, function () {
            $this->retrieveCookieLanguage();
        });
        $this->registerTranslations();
    }
1047552
protected function bootstrap($app): void
    {
        $app->bootstrapWith([
            \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
            \CrCms\Microservice\Bootstrap\LoadConfiguration::class,
            \CrCms\Microservice\Bootstrap\HandleExceptions::class,
            \CrCms\Microservice\Bootstrap\RegisterFacades::class,
            //\Illuminate\Foundation\Bootstrap\SetRequestForConsole::class,
            \Illuminate\Foundation\Bootstrap\RegisterProviders::class,
            \Illuminate\Foundation\Bootstrap\BootProviders::class,
        ]);
    }
1317946
private function initializeConfig(Application $app)
    {
        $config_provider = $app->make('Concrete\Core\Config\ConfigServiceProvider');
        $config_provider->register();

        /*
         * @var \Concrete\Core\Config\Repository\Repository
         */
        $config = $app->make('config');

        return $config;
    }
688744
public function register(Application $app)
    {
        foreach ($this->services as $key => $class) {
            if (is_numeric($key)) {
                $key = $class;
            }
            $app[$key] = $app->share(function() use ($class, $app) {
                $result = new $class();
                $app->initialize($result);
                return $result;
            });
        }

        if (!empty($this->doctrineEventSubscribers)) {
            $config = $app['config'];
            foreach ($this->doctrineEventSubscribers as $class) {
                $config['orm.subscribers'][] = $class;
            }
        }

        if (!empty($this->entityFolders)) {
            if (!isset($config)) {
                $config = $app['config'];
            }
            foreach ($this->entityFolders as $namespace => $path) {
                $config['orm.options']['orm.em.options']['mappings'][] = [
                    'type' => 'annotation',
                    'namespace' => $namespace,
                    'path' => $path,
                    'use_simple_annotation_reader' => false,
                ];
            }
        }

        if (isset($config)) {
            $app['config'] = $config;
        }

        if (php_sapi_name() === 'cli' && !empty($this->commands)) {
            $app['base_commands'] = $app->extend('base_commands', function(array $commands) {
                return array_merge($commands, $this->commands);
            });
        }
    }
538107
protected function integrateWithExtension(Application $app): void
    {
        if ($app->bound('orchestra.extension')) {
            $this->extension = $app->make('orchestra.extension');
        }

        if ($app->bound('orchestra.extension.status')) {
            $this->status = $app->make('orchestra.extension.status');
        }
    }
156050
public function addApplication(ApplicationInterface $application)
    {

        // register the application in this instance
        $this->applications[$application->getName()] = $application;

        // adds the application to the system configuration
        $this->addApplicationToSystemConfiguration($application);
    }
35360
public function bootstrap(Application $app)
    {
        $app['actions']->listen(
            'init',
            function () use ($app) {

                $this->extractWordpressClasses($app);

                $this->setDefaultPermalinkStructure($app);

                $this->bootstrapRoutes($app['router']);
            }
        );
    }
1071079
public function register(Application $app)
    {
        parent::register($app);

        // override this in config to allow a different user entity class to be used.
        if (isset($app['config']['user.entity'])) {
            $app['user.entity'] = $app['config']['user.entity'];
        } else {
            $app['user.entity'] = User::class;
        }

        // setup security for cli commands
        if (php_sapi_name() === 'cli') {
            $app['console.configure'] = $app->extend('console.configure', function ($callbacks) {
                $callbacks[] = function (Command $command) {
                    if ($command instanceof BaseCommand) {
                        $command->addOption('user', 'U', InputOption::VALUE_REQUIRED, 'User ID to run command as');
                    }
                };
                return $callbacks;
            });
            $app['console.prerun'] = $app->extend('console.prerun', function ($callbacks) {
                $callbacks[] = function (Command $command, InputInterface $input, OutputInterface $output) {
                    if ($command instanceof BaseCommand && $input->getOption('user')) {
                        $app = $command->getSilexApplication();
                        /** @var EntityManagerInterface $em */
                        $em = $app['orm.em'];
                        $app['user'] = $em->find($app['user.entity'], $input->getOption('user'));
                    }
                };
                return $callbacks;
            });
        }

        $app['security.firewalls'] = [];
        $app['security.access_rules'] = [];
        $app->register(new SecurityServiceProvider);
    }
673866
public function register(Container $app): void
    {
        $app['markdown'] = function () {
            return Parsedown::instance();
        };

        $partialsCollection = new Collection();
        $app['partials'] = $partialsCollection;

        /** @var Partial[] $partials */
        $partials = []; //$config->getPartials();
        if ($partials) {
            foreach ($partials as $partial) {
                if (! $partial->getName()) {
                    throw new MissingNameForPartialException('The name of the partial to load is missing');
                }

                $partial->setParser($app['markdown']);
                if (!$partial->getContent() && $partial->getLink()) {
                    if (! is_readable($partial->getLink())) {
                        $app['monolog']->error(
                            sprintf('Partial "%s" not readable or found.', $partial->getLink())
                        );
                        continue;
                    }
                }

                $partialsCollection->set($partial->getName(), $partial);
            }
        }
    }