L O A D I N G
Edit this page

Registering Providers

Introduction

Registering Providers

To define custom providers for any runtime go to its corresponding bootstrap file and add them to providers list. It might look like this:

$providers = $core->getDefaultProviders();
$providers = array_merge($providers, [
    'App\Provider\CustomService\CustomServiceProvider',
    'App\Provider\OtherService\OtherServiceProvider',
]);

Remember that all of the custom providers need to extend Kraken\Container\ServiceProvider and implement Kraken\Container\ServiceProviderInterface.

Start from the Beginning