This commit is contained in:
2025-03-19 04:49:12 +03:00
parent 218eeff1ad
commit 1ab56ef3c4
13 changed files with 14 additions and 20 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace Bx\Nullable\Providers;
use Bx\Nullable\AbstractFactory\MainAbstractFactory;
use Wt\Core\Interfaces\IApp;
use Wt\Core\Interfaces\IServiceProvider;
class DefaultFactoryProvider implements IServiceProvider
{
public function register(IApp $app)
{
$config = $app->config();
$serviceContainer = $app->container();
/**
* @var MainAbstractFactory $mainAbstractFactory
*/
$mainAbstractFactory = $serviceContainer->make(MainAbstractFactory::class, [$config->get('MainAbstractFactory', [])]);
$serviceContainer->singleton($app->module()->getId().':mainAbstractFactory', $mainAbstractFactory);
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace Bx\Nullable\Providers;
use Wt\Core\Interfaces\IApp;
use Wt\Core\Providers\ADefaultServiceProvider;
class DefaultServiceProvider extends ADefaultServiceProvider
{
public function register(IApp $app)
{
parent::register($app);
$container = $this->app->container();
$config = $this->app->config();
}
}