Register the failed job services.

@return void
330344
protected function registerFailedJobServices()
	{
		$this->app->singleton('queue.failer', function($app)
		{
			$config = $app['config']['queue.failed'];

			return new DatabaseFailedJobProvider($app['db'], $config['database'], $config['table']);
		});
	}
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());
            });
        }
    }
621618
public function register()
    {
        $this->registerRevisionRepository();
        $this->registerUserRepository();
        $this->registerGroupRepository();
        $this->registerCredentials();

        $this->registerLoginController();
        $this->registerRegistrationController();
        $this->registerResetController();
        $this->registerActivationController();
    }
487615
public function handle()
    {
        if (count($jobs = $this->getFailedJobs()) === 0) {
            return $this->info('No failed jobs!');
        }

        $this->displayFailedJobs($jobs);
    }
617129
public function trimFailedJobs()
    {
        $this->connection()->zremrangebyscore(
            'failed_jobs', Chronos::now()->subMinutes($this->failedJobExpires)->getTimestamp() * -1, '+inf'
        );
    }
552602
protected function registerFailedJobServices()
    {
        Zilf::$container->register(
            'queue.failer', function () {
                $config = config('queue.failed');

                return isset($config['table'])
                        ? $this->databaseFailedJobProvider($config)
                        : new NullFailedJobProvider;
            }
        );
    }
9101
public function register() {
        $configPath = __DIR__ . '/../config/backup-manager.php';
        $this->mergeConfigFrom($configPath, 'backup-manager');
        $this->registerFilesystemProvider();
        $this->registerDatabaseProvider();
        $this->registerCompressorProvider();
        $this->registerShellProcessor();
        $this->registerArtisanCommands();
    }
747504
public function registerWorker()
    {
        $this->resqueInstance->redis->sadd($this->workerName() . 's', (string)$this);
        $this->resqueInstance->redis->set($this->workerName() . ':' . (string)$this . ':started', strtotime('now UTC'));
    }
291625
protected function registerDatabaseService(): void
    {
        $this->app->alias('db', \Illuminate\Database\ConnectionResolverInterface::class);
        $this->app->register(\Illuminate\Database\DatabaseServiceProvider::class);

        if (File::exists($this->app->databasePath('seeds'))) {
            collect(File::files($this->app->databasePath('seeds')))->each(
                function ($file) {
                    File::requireOnce($file);
                }
            );
        }
    }
1249297
protected function registerServices()
    {
        $this->app->bindShared('modules', function ($app) {
            $path = $app['config']->get('modules.paths.modules');

            return new Repository($app, $path);
        });
    }
1080563
public function unregister()
    {
        $this->logger->debug('Unregistering worker ' . $this->getId());

        if ($this->currentJob) {
            $this->failJob($this->currentJob, new DirtyExitException());
        }

        $this->resque->getClient()->srem($this->resque->getKey(Resque::WORKERS_KEY), $this->getId());
        $this->resque->getClient()->del($this->getJobKey());
        $this->resque->getClient()->del($this->getJobKey() . ':started');

        $this->getStatistic('processed')->clear();
        $this->getStatistic('failed')->clear();
        $this->getStatistic('shutdown')->clear();
    }
70191
protected function registerWorkerStartCallback()
    {
        $this->swooleServer->on('WorkerStart', function ($server, $workerId) {
            $this->setProcessName(sprintf(
                '%s : Worker %d%s', $this->app->name(), $workerId, $server->taskworker ? ' Task' : ''
            ));

            $this->events->dispatch(new Events\WorkerStarted($this, $workerId));

            $this->dispatchEvent('WorkerStart', $this, $workerId);
        });
    }
696038
protected function registerErrorHandle(): void
    {
        \set_error_handler([$this, 'handleError']);
        \set_exception_handler([$this, 'handleException']);
        \register_shutdown_function(function () {
            if ($e = \error_get_last()) {
                $this->handleError($e['type'], $e['message'], $e['file'], $e['line']);
            }
        });
    }
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']);
    }
204133
public static function register() {
		ini_set('display_errors', 0);
		ini_set('display_startup_errors', 0);
		error_reporting(-1);

		static::$reservedMemory = str_repeat('a', 10240);
		static::$errorAtStart = error_get_last();

		$errorHandler = new static();
		set_error_handler([$errorHandler, 'phpErrorHandler']);
		set_exception_handler([$errorHandler, 'exceptionHandler']);

		return $errorHandler;
	}
431903
protected function logFailedJob(JobFailed $event)
    {
        $this->laravel['queue.failer']->log(
            $event->connectionName, $event->job->getQueue(),
            $event->job->getRawBody(), $event->exception
        );
    }
1270979
static public function registerDefaults() {
		if (self::$registeredStatic) {
			require_once __DIR__ . '/Exceptions/RegisterationFailed.php';
			throw new RegistrationFailed('Is already registered');
		}
		
		$loader = new static();
		$loader->registerNamespace('ZExt', __DIR__ . '/..');
		$loader->register();
		
		self::$registeredStatic = true;
		
		return $loader;
	}