4
0
Fork 0
api-powers/src/116eb429-bc51-4d14-b9aa-714.../code.power

48 lines
1.1 KiB
Plaintext

/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
* @since 2.0.1
*/
public function register(Container $container)
{
$container->alias(Upsert::class, 'GetBible.Model.Upsert')
->share('GetBible.Model.Upsert', [$this, 'getUpsert'], true);
$container->alias(Load::class, 'GetBible.Model.Load')
->share('GetBible.Model.Load', [$this, 'getLoad'], true);
}
/**
* Get the Upsert class
*
* @param Container $container The DI container.
*
* @return Upsert
* @since 2.0.1
*/
public function getUpsert(Container $container): Upsert
{
return new Upsert(
$container->get('GetBible.Config'),
$container->get('GetBible.Table')
);
}
/**
* Get the Load class
*
* @param Container $container The DI container.
*
* @return Load
* @since 2.0.1
*/
public function getLoad(Container $container): Load
{
return new Load(
$container->get('GetBible.Config'),
$container->get('GetBible.Table')
);
}