/home/techb158/public_html/wp-content/plugins/kirki/libraries/framework
Edit: /home/techb158/public_html/wp-content/plugins/kirki/libraries/framework/CoreServiceProvider.php (4102B)
register_database_services();
$this->register_discoveries();
$this->register_managers();
$this->register_migrations();
$this->register_messages();
$this->app->singleton(Response::class);
$this->app->singleton(TemplateEngine::class);
$this->app->singleton(ViewContext::class);
if (\class_exists(\Faker\Factory::class)) {
$this->app->singleton(\Faker\Factory::class, function () {
return \Faker\Factory::create();
});
}
}
/**
* Boot the service provider.
*
* @return void
*
* @since 1.0.0
*/
public function boot()
{
$this->app->make(PolicyDiscovery::class)->discover()->cache();
$this->app->make(ListenerDiscovery::class)->discover()->cache();
}
/**
* Register the messages.
*
* @return void
*
* @since 1.0.0
*/
protected function register_messages()
{
$this->app->singleton(MessagesBag::class, function () {
return new MessagesBag();
});
}
/**
* Register the managers.
*
* @return void
*
* @since 1.0.0
*/
protected function register_managers()
{
$this->app->singleton(DatabaseManager::class);
$this->app->singleton(SchemaManager::class);
$this->app->singleton(LogManager::class);
$this->app->singleton(EventManager::class);
$this->app->singleton(PolicyManager::class);
$this->app->singleton(CookieManager::class);
$this->app->bind(SomoyInterface::class, function () {
return new Somoy();
});
$this->app->singleton(CommandManager::class);
}
/**
* Register the discoveries.
*
* @return void
*
* @since 1.0.0
*/
protected function register_discoveries()
{
$this->app->singleton(ListenerDiscovery::class);
$this->app->singleton(PolicyDiscovery::class);
}
/**
* Register the database singletons.
*
* @return void
*
* @since 1.0.0
*/
protected function register_database_services()
{
$this->app->singleton(Connection::class);
$this->app->singleton(Migrator::class);
}
/**
* Register the migrations tags.
*
* @return void
*
* @since 1.0.0
*/
protected function register_migrations()
{
$migrations_path = $this->app->config_path('migrations.php');
if (!\file_exists($migrations_path)) {
return;
}
$migrations = (include $migrations_path);
if (empty($migrations)) {
return;
}
$this->app->tag($migrations, 'app.migrations');
}
}