Register method.
495946
public function register()
    {
        // Configuring all guzzle clients.
        $this->app->bind(ClientInterface::class, function () {
            // Guzzle client
            return new Client(['handler' => $this->app->make(HandlerStack::class)]);
        });

        $this->app->alias(ClientInterface::class, Client::class);

        // Bind if needed.
        $this->app->bind(HandlerStack::class, function () {
            return HandlerStack::create();
        });

        // If resolved, by this SP or another, add some layers.
        $this->app->resolving(HandlerStack::class, function (HandlerStack $stack) {
            // We cannot log with debugbar from the CLI
            if ($this->app->runningInConsole()) {
                return;
            }
            
            /** @var \DebugBar\DebugBar $debugBar */
            $debugBar = $this->app->make('debugbar');

            $stack->push(new Middleware(new Profiler($timeline = $debugBar->getCollector('time'))));
            $stack->unshift(new ExceptionMiddleware($debugBar->getCollector('exceptions')));

            /** @var \GuzzleHttp\MessageFormatter $formatter */
            $formatter = $this->app->make(MessageFormatter::class);
            $stack->unshift(GuzzleMiddleware::log($debugBar->getCollector('messages'), $formatter));

            // Also log to the default PSR logger.
            if ($this->app->bound(LoggerInterface::class)) {
                $logger = $this->app->make(LoggerInterface::class);

                // Don't log to the same logger twice.
                if ($logger === $debugBar->getCollector('messages')) {
                    return;
                }

                // Push the middleware on the stack.
                $stack->unshift(GuzzleMiddleware::log($logger, $formatter));
            }
        });
    }
103041
public void register() {
        routes.values().forEach(route -> logAddRoute(log, route));
        hooks.values().stream().flatMap(Collection::stream).forEach(route -> logAddRoute(log, route));

        Stream.of(routes.values(), hooks.values().stream().findAny().orElse(new ArrayList<>()))
                .flatMap(Collection::stream).forEach(this::registerRoute);

        regexMapping.register();

        webSockets.keySet().forEach(path -> logWebSocket(log, path));
    }
742797
protected function register()
    {
        // Make posttype model for the factory.
        $this->setModel($this->makePosttypeModel());

        // Build posttype with model.
        $this->setSingularity($this->makePosttypeInstance());

        // Set columns to the posttype, after admin init.
        if ($this->methodExist('columns')) {
            $this->registerColumns();
        }

        // Set posttype post templates.
        if ($this->methodExist('templates')) {
            $this->registerTemplates();
        }
    }
767799
public static function register()
    {
        ini_set('unserialize_callback_func', 'spl_autoload_call');

        if (false === spl_autoload_register(array(self::getInstance(), 'autoload'))) {
            throw new Exception(sprintf('Unable to register %s::autoload as an autoloading method.', get_class(self::getInstance())));
        }
    }
1358157
public function register()
    {
        $this->setupCache();
        $this->mergeConfig();
        $this->setupMetaData();
        $this->setupConnection();
        $this->registerManagerRegistry();
        $this->registerEntityManager();
        $this->registerClassMetaDataFactory();
        $this->registerExtensions();
        $this->registerCustomTypes();
        $this->registerPresenceVerifier();
        $this->registerConsoleCommands();
    }
481880
public function register()
    {
        $this->registerRouter();

        $this->registerUrlGenerator();

        $this->registerRedirector();

        $this->registerResponseFactory();

        $this->registerControllerDispatcher();
    }
474954
public function register()
    {
        $commands = array(
            'PackageList',
            'PackageMigrate',
            'PackageMigrateRefresh',
            'PackageMigrateReset',
            'PackageMigrateRollback',
            'PackageMigrateStatus',
            'PackageSeed',
            'PackageOptimize',

            //
            'PackageMake',
            'ConsoleMake',
            'ControllerMake',
            'EventMake',
            'JobMake',
            'ListenerMake',
            'MiddlewareMake',
            'ModelMake',
            'NotificationMake',
            'PolicyMake',
            'ProviderMake',
            'MigrationMake',
            'RequestMake',
            'SeederMake',
        );

        foreach ($commands as $command) {
            $method = 'register' .$command .'Command';

            call_user_func(array($this, $method));
        }
    }
810511
public function register()
    {
        $this->registerDisableCommand();
        $this->registerEnableCommand();
        $this->registerListCommand();
        $this->registerMigrateCommand();
        $this->registerMigrateRefreshCommand();
        $this->registerMigrateResetCommand();
        $this->registerMigrateRollbackCommand();
        $this->registerOptimizeCommand();
        $this->registerSeedCommand();
    }
156642
public void register() {
        if (registration != null) {
            throw new IllegalStateException("Webapplication is already registered.");
        }
        validateNotNull(applicationName, "applicationName");
        validateNotNull(mountPoint, "mountPoint");
        Hashtable<String, Object> props = new Hashtable<String, Object>();
        props.put(Constants.APPLICATION_NAME, applicationName);
        props.put(Constants.MOUNTPOINT, mountPoint);
        props.put(Constants.CONTEXT_PARAMS, contextParam);
        registration = bundleContext.registerService(WebApplicationFactory.class, this, props);
    }
920608
public function register() : void
    {
        if ($this->getConfigParam('env') == 'prod') {
            ini_set('display_errors', 'Off');
        } else {
            ini_set('display_errors', 'On');
        }
        error_reporting(E_ALL);
        set_error_handler([$this, 'handleError']);
        set_exception_handler([$this, 'handleException']);
    }
663366
public function register() {

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

		$this->app->alias( Attributes::class, 'attr' );
	}
177752
public function register()
    {
        // Bind the manager interface to the default implementation
        $this->app->bind(ValidatorManagerInterface::class, ValidatorManager::class);
        $this->app->bind(ValidatorForSubjectInterface::class, ValidatorForSubjectManager::class);
    }
618129
public final void register() {
        synchronized (lock) {
            if (serviceRegistration == null) {
                BundleClassResolver resolver = new BundleClassResolver();
                serviceRegistration = bundleContext.registerService(SERVICE_NAMES, resolver, serviceProperties);
            }
        }
    }
981901
public function register()
	{
		$logger = new Writer(
			new Logger($this->app['env']), $this->app['events']
		);

		$this->app->instance('log', $logger);

		// If the setup Closure has been bound in the container, we will resolve it
		// and pass in the logger instance. This allows this to defer all of the
		// logger class setup until the last possible second, improving speed.
		if (isset($this->app['log.setup']))
		{
			call_user_func($this->app['log.setup'], $logger);
		}
	}
292296
public function register()
    {
        $this->registerAuthenticator();
        $this->registerUserResolver();
        $this->registerAccessGate();
        $this->registerRequestRebindHandler();
        $this->registerEventRebindHandler();
    }
693772
public void register() {
        logger.debug("[register] uri = {}", getManagementUri());

        JsonNode jsonNode;
        ObjectMapper objectMapper = jsonObjectMapper.getObjectMapperBinary();
        ObjectNode objectNode = objectMapper.createObjectNode();
        objectNode.put(CommandParameters.METHOD, "register");

        try {
            jsonNode = objectMapper.readTree(managementConnection.sendWithResult(objectMapper.writeValueAsBytes(objectNode)));
        }
        catch (Exception e) {
            logger.error("[register] could not register at server");
            return;
        }

        id = jsonNode.get("id").asText();
        setMaster(jsonNode.get("isMaster").asBoolean());

        managementConnection.setServerId(id);

        logger.debug("[register] id = {}, isMaster = {}, uri = {}", getId(), isMaster(), getManagementUri());
    }
1180233
public function register(): void
    {
        if (!$this->registered) {
            \spl_autoload_register([$this, 'load'], true, true);
            $this->registered = true;
        }
    }