48 lines
1.1 KiB
Plaintext
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')
|
|
);
|
|
} |