Handles registering Scara's pre-execution status.

@return void
350503
public function boot()
    {
        $this->loadConfig();
        $this->registerExceptionHandler();
        $this->registerProviders();
        $this->registerAliases();
        $this->registerScaraMasterSessionToken();
    }
792872
public function triggerBeforeFind()
    {
        if (!$this->_beforeFindFired && $this->_type === 'select') {
            $this->_beforeFindFired = true;

            /** @var \Cake\Event\EventDispatcherInterface $repository */
            $repository = $this->getRepository();
            $repository->dispatchEvent('Model.beforeFind', [
                $this,
                new ArrayObject($this->_options),
                !$this->isEagerLoaded()
            ]);
        }
    }
450327
public function runBefore() {
        if($this->_beforeController !== null) {
            foreach($this->_beforeController as $hookProvider) {
                $hookProvider->doBefore();
            }
        }
    }
481880
public function register()
    {
        $this->registerRouter();

        $this->registerUrlGenerator();

        $this->registerRedirector();

        $this->registerResponseFactory();

        $this->registerControllerDispatcher();
    }
251151
protected function registerStatus()
    {
        if (empty($this->status)) {
            return;
        }

        foreach ($this->status as $key => $args) {
            register_post_status($key, $args);
        }

        Metabox::make('themosis_publish', $this->slug)
            ->setTitle(__('Publish'))
            ->setContext('side')
            ->setPriority('core')
            ->setCallback(function ($args) {
                echo view('_themosisPublishMetabox', [
                    'statuses' => $this->status,
                    '__post' => $args['post']
                ]);
            })
            ->set();
    }
349486
private function load(): void
	{
		// Skip if it's already loaded
		if ($this->state === self::STATE_LOADED) return;

		// Attach parameters (only if we have some)
		if ($this->parameters !== []) {
			// Attach parameters to form
			$this['parametersForm']->setDefaults($this->parameters);

			// Attach parameters to subreport
			$this->subreport->attach($this->parameters);
		}

		// Compile (fetch data)
		$this->subreport->compile();

		// Preprocess (only if it is not already)
		if (!$this->subreport->isState(Subreport::STATE_PREPROCESSED)) {
			$this->subreport->preprocess();
		}

		// Change inner state
		$this->state = self::STATE_LOADED;
	}
139342
public function registerAdminAction() {
		global $pagenow;

		if ( $pagenow !== 'admin.php' ) {
			return;
		}

		$page_hook = $this->getAdminPageHook();
		$hook_suffix = $this->getAdminHook( $page_hook );

		add_action( "load-{$hook_suffix}", [$this, 'actionAdminLoad'] );
		add_action( $hook_suffix, [$this, 'actionAdmin'] );
	}
179550
public function onBeforeWrite() {
        parent::onBeforeWrite();

        $defaults = $this->owner->config()->defaults;
        $URLSegment = $this->owner->URLSegment;
        // If there is no URLSegment set, generate one from Title
        if((!$URLSegment || $URLSegment == $defaults['URLSegment']) && $this->owner->Title != $defaults['Title']) {
            $URLSegment = $this->generateURLSegment($this->owner->Title);
        } else if($this->owner->isChanged('URLSegment')) {
            // Make sure the URLSegment is valid for use in a URL
            $segment = preg_replace('/[^A-Za-z0-9]+/','-',$this->owner->URLSegment);
            $segment = preg_replace('/-+/','-',$segment);
            // If after sanitising there is no URLSegment, give it a reasonable default
            if(!$segment) {
                $segment = $this->fallbackUrl();
            }
            $URLSegment = $segment;
        }
        // Ensure that this object has a non-conflicting URLSegment value.
        $count = 2;
        $ID = $this->owner->ID;
        while($this->lookForExistingURLSegment($URLSegment, $ID)) {
            $URLSegment = preg_replace('/-[0-9]+$/', null, $URLSegment) . '-' . $count;
            $count++;
        }

        $this->owner->URLSegment = $URLSegment;
    }
1084418
public function onReady()
    {
        if ($this->pool->identd) {
            /** @noinspection PhpParamsInspection */
            $this->getSocketName();
            $this->pool->identd->registerPair($this->locAddr, $this->locPort, ['UNIX', $this->user]);
        }
        list($this->nick, $this->realname) = explode('/', $this->path . '/John Doe');
        $this->command('USER', $this->user, 0, '*', $this->realname);
        $this->command('NICK', $this->nick);
        if (mb_orig_strlen($this->password)) {
            $this->message('NickServ', 'IDENTIFY ' . $this->password);
        }
    }
188110
public function register()
    {

        if ('LaravelCommode\Common\CommodeCommonServiceProvider' !== get_class($this)) {
            /**
             * Prepare service
             */
            $this->prepareService();

            /**
             * Bind app's 'booting' event resolving, aliases and launching methods
             */
            $this->app->booting($this->getResolver()->makeClosure(function () {

                if (count($this->aliases) > 0) {
                    $loader = AliasLoader::getInstance();

                    foreach ($this->aliases as $facadeName => $facadeClass) {
                        $loader->alias($facadeName, $facadeClass);
                    }
                }

                $this->launchClosure();
            }));

        }

        /**
         * Register service
         */
        $this->registering();
    }
18850
private function startup()
	{
		$this->registerSigHandlers();
		$this->pruneDeadWorkers();
		Resque_Event::trigger('beforeFirstFork', $this);
		$this->registerWorker();
	}
490412
protected static function register()
    {
        if (!self::$registered) {
            // set up __autoload
            $autoload = spl_autoload_functions();
            spl_autoload_register(__CLASS__.'::load');
            if (function_exists('__autoload') && ($autoload === false)) {
                // __autoload() was being used, but now would be ignored, add
                // it to the autoload stack
                spl_autoload_register('__autoload');
            }
        }
        self::$registered = true;
    }
1336886
public function register()
    {
        /**
         * @deprecated Use the final ConsoleRunner class directly
         * @todo Remove in v9
         */
        if (!class_exists(DeprecatedConsoleRunner::class)) {
            class_alias(ConsoleRunner::class, DeprecatedConsoleRunner::class);
        }

        $this->app->extend(Application::class, function (Application $cli) {
            $this->cli = $cli;
            $this->setupDefaultCommands();
            $this->setupDoctrineCommands();

            return $cli;
        });
    }
1309798
public function register($placement = 'prepend')
	{
		$prepend = ($placement === 'append') ? false : true;

		spl_autoload_register(array($this, 'resolve'), true, $prepend);
	}
716549
protected function registerFailingQueueHandler()
    {
        if ($this->eye->laravelVersionIs('>=', '5.2.0')) {
            app(QueueManager::class)->failing(function (JobFailed $e) {
                $this->eye->queue()->failedQueue($e->connectionName,
                                                      $e->job->resolveName(),
                                                      $e->job->getQueue());
            });
        } else {
            app(QueueManager::class)->failing(function ($connection, $job, $data) {
                $this->eye->queue()->failedQueue($connection,
                                                      $this->eye->queue()->resolveLegacyName($job),
                                                      $job->getQueue());
            });
        }
    }
280043
public function onBeforeInsert()
	{
		if ($this->defaultArchiveValue === null || !empty($this->owner->{$this->archiveAttribute})) return;
		$this->owner->{$this->archiveAttribute} = $this->defaultArchiveValue;
	}
140135
protected function registerBugsnagHandlers($callPrevious)
    {
        $this->registerErrorHandler($callPrevious);
        $this->registerExceptionHandler($callPrevious);
        $this->registerShutdownHandler();
    }