Run the service provider register handle.

@return void

@author Seven Du <shiweidu@outlook.com>
773541
public function register()
    {
        // Marge the CORS config.
        $this->mergeConfigFrom(__DIR__.'/../../config/lumen.php', 'cors');

        // Register the CORS server instance alias.
        $this->app->alias(CorsInterface::class, Cors::class);

        // Register CORS servise singleton.
        $this->app->singleton(CorsInterface::class, function ($app) {
            // Get CORS config.
            $config = $app['config']->get('cors');

            return new Cors($config);
        });
    }
585991
protected function runApplicationWithEvents()
    {
        $this->prepareEnvironment();

        if (static::$before) {
            $this->runBeforeCallbacks();
        }
        // read configs/general.php for register aliases
        $this->readGeneralConfigs();
        // register all aliases
        $this->registerAliases();
        // register helpers;
        $this->resolveHelpers();

        //execute the service providers
        $this->prepareServiceProviders();

        if (static::$after) {
            $this->runAfterCallbacks();
        }
    }
343347
public function run()
    {

        // register the default autoloader
        require SERVER_AUTOLOADER;

        // register shutdown handler
        register_shutdown_function(array(&$this, "shutdown"));

        // we need to register the class loaders again
        $application = $this->application;
        $application->registerClassLoaders();

        // register the applications annotation registries
        $application->registerAnnotationRegistries();

        // add the application instance to the environment
        Environment::singleton()->setAttribute(EnvironmentKeys::APPLICATION, $application);

        // create s simulated request/session ID whereas session equals request ID
        Environment::singleton()->setAttribute(EnvironmentKeys::SESSION_ID, $sessionId = SessionUtils::generateRandomString());
        Environment::singleton()->setAttribute(EnvironmentKeys::REQUEST_ID, $sessionId);

        // load application and message instance
        $message = $this->message;

        try {
            // create an intial context instance
            $initialContext = new InitialContext();
            $initialContext->injectApplication($application);

            // load the callbacks for the actual message state
            foreach ($message->getCallbacks($message->getState()) as $callback) {
                // explode the lookup + method name
                list ($lookupName, $methodName) = $callback;
                // lookup the bean instance and invoke the callback
                call_user_func(array($initialContext->lookup($lookupName), $methodName), $message);
            }

        } catch (\Exception $e) {
            \error($e->__toString());
        }
    }
742602
public function register()
	{
		$this->app['db'] = function($app)
		{
			// @FIXME: this isn't pretty, but it will shim the removal of the old mysql_* calls from php
			$driver = ($app['config']->get('dbtype') == 'pdo') ? 'mysql' : $app['config']->get('dbtype');

			$options = [
				'driver'   => $driver,
				'host'     => $app['config']->get('host'),
				'user'     => $app['config']->get('user'),
				'password' => $app['config']->get('password'),
				'database' => $app['config']->get('db'),
				'prefix'   => $app['config']->get('dbprefix')
			];

			return Driver::getInstance($options);
		};
	}
1237218
public function run() {
		add_action(
			'init',
			function() {
				load_plugin_textdomain( 'github-updater' );
			}
		);

		define( 'GITHUB_UPDATER_DIR', $this->dir );

		// Load Autoloader.
		require_once $this->dir . '/vendor/autoload.php';

		register_activation_hook( $this->file, array( new Init(), 'rename_on_activation' ) );
		( new Init() )->run();

		/**
		 * Initialize Persist Admin notices Dismissal.
		 *
		 * @link https://github.com/collizo4sky/persist-admin-notices-dismissal
		 */
		add_action( 'admin_init', array( 'PAnD', 'init' ) );
	}
1211220
public function run()
    {
        $config = Config::get('global.config', 'aliases');
        $alias = new Manager($config['classes']);
        $alias->register();
        $this->container->set('alias', $alias);
    }
209570
public function run()
	{

		list($name, $id) = $this->resolveNameID();

		$this->registerClientScript($id);

		$this->htmlOptions['id'] = $id;

		// Do we have a model?
		if ($this->hasModel()) {
			if ($this->form) {
				$html = $this->form->textArea($this->model, $this->attribute, $this->htmlOptions);
			} else {
				$html = CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
			}
		} else {
			$html = CHtml::textArea($name, $this->value, $this->htmlOptions);
		}
		echo $html;
	}
576310
public function run()
    {
        $userLastActivity = \yii\helpers\Json::encode($this->getOptions());

        $this->view->registerJs(<<<JS
        new sx.classes.UserLastActivity({$userLastActivity});
JS
        );
    }
1306071
public static function run()
    {
        self::registerAutoloader();
        self::registerErrorHandler();

        $container = self::buildContainer();
        $container->call(Healthcheck::class);

        $handler = $container->make(RequestHandler::class);
        $response = $handler();
        $response->send();
    }
411037
public function run()
    {

        try {
            // register the default autoloader
            require SERVER_AUTOLOADER;

            // register shutdown handler
            register_shutdown_function(array(&$this, "shutdown"));

            // add the application instance to the environment
            Environment::singleton()->setAttribute(EnvironmentKeys::APPLICATION, $this);

            // create s simulated request/session ID whereas session equals request ID
            Environment::singleton()->setAttribute(EnvironmentKeys::SESSION_ID, $sessionId = SessionUtils::generateRandomString());
            Environment::singleton()->setAttribute(EnvironmentKeys::REQUEST_ID, $sessionId);

            // log a message that we now start to connect the application
            $this->getInitialContext()->getSystemLogger()->debug(sprintf('%s wait to be connected', $this->getName()));

            // register the class loaders
            $this->registerClassLoaders();

            // register the annotation registries
            $this->registerAnnotationRegistries();

            // initialize the managers
            $this->initializeManagers();

            // provision the application
            if ($this->getContainer()->hasProvisioningEnabled()) {
                $this->provision();
            }

            // initialize the profile logger and the thread context
            $profileLogger = null;
            /** @var \AppserverIo\Logger\ThreadSafeLoggerInterface $profileLogger */
            if ($profileLogger = $this->getInitialContext()->getLogger(LoggerUtils::PROFILE)) {
                $profileLogger->appendThreadContext('application');
            }

            // invoke the application's managers postStartup() lifecycle callbacks
            $this->postStartupManagers();

            // the application has successfully been initialized
            $this->synchronized(function ($self) {
                $self->applicationState = ApplicationStateKeys::get(ApplicationStateKeys::INITIALIZATION_SUCCESSFUL);
            }, $this);

            // log a message that we has successfully been connected now
            \info(sprintf('%s has successfully been connected', $this->getName()));

            // initialize the flag to keep the application running
            $keepRunning = true;

            // wait till application will be shutdown
            while ($keepRunning) {
                // query whether we've a profile logger, log resource usage
                if ($profileLogger) {
                    $profileLogger->debug(sprintf('Application %s is running', $this->getName()));
                }

                // wait a second to lower system load
                $keepRunning = $this->synchronized(function ($self) {
                    $self->wait(100000 * Application::TIME_TO_LIVE);
                    return $self->applicationState->equals(ApplicationStateKeys::get(ApplicationStateKeys::INITIALIZATION_SUCCESSFUL));
                }, $this);
            }

            // log a message that we has successfully been shutdown now
            \info(sprintf('%s start to shutdown managers', $this->getName()));

            // array for the manager shutdown threads
            $shutdownThreads = array();

            // we need to stop all managers, because they've probably running threads
            /** @var \AppserverIo\Psr\Application\ManagerInterface $manager */
            foreach ($this->getManagers() as $manager) {
                $shutdownThreads[] = new ManagerShutdownThread($manager);
            }

            // wait till all managers have been shutdown
            /** @var \AppserverIo\Appserver\Application\ManagerShutdownThread $shutdownThread */
            foreach ($shutdownThreads as $shutdownThread) {
                $shutdownThread->join();
            }

            // the application has been shutdown successfully
            $this->synchronized(function ($self) {
                $self->applicationState = ApplicationStateKeys::get(ApplicationStateKeys::SHUTDOWN);
            }, $this);

            // cleanup the naming directory with the application entries
            $this->unload();

            // log a message that we has successfully been shutdown now
            \info(sprintf('%s has successfully been shutdown', $this->getName()));

        } catch (\Exception $e) {
            LoggerUtils::log(LogLevel::ERROR, $e);
        }
    }
1196922
public function register()
    {
        if ($this->app->environment() !== 'production') {
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
        }
        // ...
    }
1150887
public function run()
    {
        $this->logger->info('Initialization...');

        $this->initWebsocketServer();

        if ($this->sandstoneApplication->isPushEnabled()) {
            $this->initPushServer();
        }

        $this->sandstoneApplication->boot();

        $this->logger->info('Bind websocket server', $this->sandstoneApplication['sandstone.websocket.server']);

        if ($this->sandstoneApplication->isPushEnabled()) {
            $this->logger->info('Bind push server', $this->sandstoneApplication['sandstone.push.server']);
        }

        $this->loop->run();
    }
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']);
    }
399126
public function run()
    {
        // why I put it here because you can override the implementation
        require_once dirname(__FILE__).'/../functions.php';

        if ($this->isRunning) {
            return;
        }

        $this->isRunning = true;

        $this->add(new \Bono\Middleware\CommonHandlerMiddleware());

        $this->slimRun();
    }
1294699
public function launching()
    {
        /**
         * registering default commands
         */
        $this->with([self::PROVIDES_SERVICE], function (IBladedManager $manager) {
            $manager->registerCommandNamespace('scope', Scope::class);
            \phpQuery::newDocument();
            $manager->registerCommandNamespace('form', Form::class);
            $manager->registerCommandNamespace('template', Template::class);
        });
    }
807938
protected function registerMailer(): void
    {
        $this->app->singleton('orchestra.mail', function ($app) {
            $mailer = new Mailer($app, $transport = new TransportManager($app));

            if ($app->bound('orchestra.platform.memory')) {
                $mailer->attach($memory = $app->make('orchestra.platform.memory'));
                $transport->setMemoryProvider($memory);
            }

            if ($app->bound('queue')) {
                $mailer->setQueue($app->make('queue'));
            }

            return $mailer;
        });
    }
978879
public function register()
  {
    $middleware = ($this->middleware !== null) ? ['middleware' => $this->middleware] : [];
    $prefix     = ($this->prefix !== null) ? ['prefix' => $this->prefix] : [];
    $domain     = ($this->domain !== null) ? ['domain' => $this->domain] : [];

    Swish::group(array_merge($domain, $middleware, $prefix), function() {
      startphp($this->file);
    });
  }