Register the AccessHandler implementation into the IoC Container.
This package provides a BasicAccessHandler.

@return \Styde\Html\Access\AccessHandler
430226
protected function registerAccessHandler()
    {
        $this->app->singleton('access', function ($app) {
            $guard = $app['config']->get('html.guard', null);
            $handler = new BasicAccessHandler($app['auth']->guard($guard));

            $gate = $app->make(Gate::class);
            if ($gate) {
                $handler->setGate($gate);
            }

            return $handler;
        });

        $this->app->alias('access', AccessHandler::class);
    }
253031
public function getRequestHandler()
    {
        if (isset($this->requestHandler))
            return $this->requestHandler;

        // now instantiating handler from config
        $handlerClass = "\\" . ltrim($this->handlerClass, "\\");
        if (!class_exists($handlerClass))
            throw new RuntimeException("Unable to create HTTP Handler instance with class: " . var_export($handlerClass, true));

        $this->requestHandler = new $handlerClass();
        return $this->requestHandler;
    }
1297581
public function register()
    {
        $this->app->singleton(ExceptionIdentifier::class, function () {
            return new ExceptionIdentifier();
        });

        $this->app->singleton(ExceptionInfoInterface::class, function () {
            $path = __DIR__.'/../resources/errors.json';

            return new ExceptionInfo(realpath($path));
        });

        $this->app->bind(HtmlDisplayer::class, function (Container $app) {
            $info = $app->make(ExceptionInfoInterface::class);
            $generator = $app->make($this->app instanceof LumenApplication ? LumenGenerator::class : LaravelGenerator::class);
            $assets = function ($path) use ($generator) {
                return $generator->asset($path);
            };
            $path = __DIR__.'/../resources/error.html';

            return new HtmlDisplayer($info, $assets, realpath($path));
        });

        $this->app->bind(VerboseFilter::class, function (Container $app) {
            $debug = $app->config->get('app.debug', false);

            return new VerboseFilter($debug);
        });
    }
735574
public function register()
    {
        // Configure any bindings that are version dependent
        $this->provider->register();

        // Let the IoC container be able to make a Symfony event dispatcher
        $this->app->bind(
            'Symfony\Component\EventDispatcher\EventDispatcherInterface',
            'Symfony\Component\EventDispatcher\EventDispatcher'
        );

        // Setup default configurations for the Tmdb Client
        $this->app->singleton('Tmdb\Client', function() {
            $config = $this->provider->config();
            $options = $config['options'];

            // Use an Event Dispatcher that uses the Laravel event dispatcher
            $options['event_dispatcher'] = $this->app->make('Tmdb\Laravel\Adapters\EventDispatcherAdapter');

            // Register the client using the key and options from config
            $token = new ApiToken($config['api_key']);
            return new Client($token, $options);
        });

        // bind the configuration (used by the image helper)
        $this->app->bind('Tmdb\Model\Configuration', function() {
            $configuration = $this->app->make('Tmdb\Repository\ConfigurationRepository');
            return $configuration->load();
        });
    }
1308055
public static function getAccessControlManager()
	{
		if(self::$_instance === NULL)
			throw new SonicRuntimeException('Sonic instance not initialized');
		
		if(self::$_instance->accessControlManager != NULL)
			return self::$_instance->accessControlManager;
		else
			throw new AccessControlManagerException('AccessControlManager instance not found');
	}
1123574
public function register()
    {
        $this->app->register(ScaffoldInterfaceEventServiceProvider::class);

        $this->app->singleton('laravelRequest', \Illuminate\Http\Request::class);

        $this->app->singleton('Request', \Amranidev\ScaffoldInterface\Http\Request::class);

        $this->app->singleton('Scaffold', \Amranidev\ScaffoldInterface\Scaffold::class);

        $this->app->singleton('Datasystem', function ($app) {
            return new \Amranidev\ScaffoldInterface\Datasystem\Datasystem($app->make('Request')->getRequest());
        });

        $this->app->singleton('Parser', function ($app) {
            return new \Amranidev\ScaffoldInterface\Parsers\Parser($app->make('Request')->getRequest());
        });

        $this->app->singleton('Indenter', \Gajus\Dindent\Indenter::class);

        $this->app->singleton('Path', \Amranidev\ScaffoldInterface\Filesystem\Path::class);

        $this->app->singleton('Generator', \Amranidev\ScaffoldInterface\Generators\Generator::class);

        $this->app->singleton('ModelGenerate', \Amranidev\ScaffoldInterface\Generators\ModelGenerate::class);

        $this->app->singleton('ViewGenerate', \Amranidev\ScaffoldInterface\Generators\ViewGenerate::class);

        $this->app->singleton('MigrationGenerate', \Amranidev\ScaffoldInterface\Generators\MigrationGenerate::class);

        $this->app->singleton('ControllerGenerate', \Amranidev\ScaffoldInterface\Generators\ControllerGenerate::class);

        $this->app->singleton('RouteGenerate', \Amranidev\ScaffoldInterface\Generators\RouteGenerate::class);
    }
1282202
protected function registerRequestRebindHandler()
	{
		$this->app->rebinding('request', function($app, $request)
		{
			$request->setUserResolver(function() use ($app)
			{
				return $app['auth']->user();
			});
		});
	}
1317080
protected function registerAccountTypeInterface()
	{
		$this->app->bind('Mgallegos\DecimaAccounting\Accounting\Repositories\AccountType\AccountTypeInterface', function($app)
		{
			$AuthenticationManager = $app->make('App\Kwaai\Security\Services\AuthenticationManagement\AuthenticationManagementInterface');

			return new \Mgallegos\DecimaAccounting\Accounting\Repositories\AccountType\EloquentAccountType(new AccountType(), $AuthenticationManager->getCurrentUserOrganizationConnection());
		});
	}
1224002
protected function acquireAccessToken()
	{
		$accessToken = parent::acquireAccessToken();

		if ($this->cache !== null)
			$this->cache->put($this->accessToken);

		return $accessToken;
	}
1209900
protected function registerUrlGenerator()
    {
        $this->app->singleton('url', function ($app) {
            $routes = $app['router']->getRoutes();

            // The URL generator needs the route collection that exists on the router.
            // Keep in mind this is an object, so we're passing by references here
            // and all the registered routes will be available to the generator.
            $app->instance('routes', $routes);

            $url = new UrlGenerator(
                $routes, $app->rebinding(
                    'request', $this->requestRebinder()
                ), $app['config']['app.asset_url']
            );

            // Next we will set a few service resolvers on the URL generator so it can
            // get the information it needs to function. This just provides some of
            // the convenience features to this URL generator like "signed" URLs.
            $url->setSessionResolver(function () {
                return $this->app['session'];
            });

            $url->setKeyResolver(function () {
                return $this->app->make('config')->get('app.key');
            });

            // If the route collection is "rebound", for example, when the routes stay
            // cached for the application, we will need to rebind the routes on the
            // URL generator instance so it has the latest version of the routes.
            $app->rebinding('routes', function ($app, $routes) {
                $app['url']->setRoutes($routes);
            });

            return $url;
        });
    }
731286
public function createHandler()
    {
        $this->pushHeaderMiddleware(
            function (RequestInterface $request) {
                return $request->withHeader('User-Agent', Pay::CLIENT . ' v' . Pay::VERSION);
            }
        );

        $this->pushBasicAuthMiddleware(
            function (RequestInterface $request) {
                return $request->withHeader(
                    'Authorization', 'Basic ' . base64_encode(
                        $this->config->getClientId() . ':' . $this->config->getClientSecret()
                    )
                );
            }
        );

        $this->pushRetryMiddleware(self::decider(), self::delay());

        return $this->stack;
    }
783178
protected function registerJwTProvider()
    {
        $this->app->singleton('afroware.jwT.provider.jwT', function ($app) {
            $provider = $this->config('providers.jwT');

            return new $provider(
                $this->config('secret'),
                $this->config('algo'),
                $this->config('keys')
            );
        });
    }
1111780
public function registerByAccessibility()
    {
        switch ($this->getArgument('accessibility')) {
            case 'unauthorized':
                $this->registerAsUnauthorized();
                break;

            case 'authorized':
                $this->registerAsAuthorized();
                break;

            default:
                $this->registerAsUnauthorized();
                $this->registerAsAuthorized();
                break;
        }
    }
270048
protected function registerPolicyAfterResolvingHandler()
    {
        $this->app->afterResolving(Policy::class, function (Policy $policy) {
            return $policy->setAuthorization($this->app->make(FactoryContract::class));
        });
    }
483844
public function getAccessor()
    {
        if ($this->accessor) {
            return $this->accessor;
        }

        $this->accessor = new DocumentAccessor($this->getDocument());

        return $this->accessor;
    }
346881
public function createHandlerByConfig(): \SessionHandlerInterface
    {
        if (!isset($this->getConfig()['driver'])) {
            throw new \InvalidArgumentException('Session driver required');
        }
        $handler = $this->getHandler($this->getConfig()['driver']);
        $handler instanceof LifetimeInterface && $handler->setLifetime($this->getConfig()['lifetime']);
        return $handler;
    }
858584
public function registerConnector()
    {
        MongolidIoc::setContainer($this->app);

        $this->app->singleton(
            Pool::class,
            function ($app) {
                $config = $app['config']->get('database.mongodb.default') ?? [];
                $connectionString = $this->buildConnectionString($config);
                $options = $config['options'] ?? [];
                $driverOptions = $config['driver_options'] ?? [];

                $connection = new Connection($connectionString, $options, $driverOptions);
                $connection->defaultDatabase = $config['database'] ?? 'mongolid';

                $pool = new Pool();
                $pool->addConnection($connection);

                return $pool;
            }
        );
        $this->app->singleton(
            EventTriggerService::class,
            function ($app) {
                $eventService = new EventTriggerService();
                $eventService->registerEventDispatcher($app->make(LaravelEventTrigger::class));

                return $eventService;
            }
        );
        $this->app->singleton(
            CacheComponentInterface::class,
            function ($app) {
                return new LaravelCacheComponent($app[CacheRepository::class]);
            }
        );
    }