1 | <?php |
||
13 | class Application extends Container |
||
14 | { |
||
15 | public function __construct(string $root) |
||
16 | { |
||
17 | parent::__construct(); |
||
18 | |||
19 | $fs = new Filesystem($this, $root); |
||
20 | |||
21 | $this->share(Application::class, $this); |
||
22 | $this->share(Container::class, $this); |
||
23 | $this->share(Filesystem::class, $fs); |
||
24 | |||
25 | $this->addServiceProvider(Provider\GuzzleProvider::class); |
||
26 | $this->addServiceProvider(Provider\CoreProvider::class); |
||
27 | $this->addServiceProvider(Provider\PoolProvider::class); |
||
28 | $this->addServiceProvider(Provider\ServiceProvider::class); |
||
29 | $this->addServiceProvider(Provider\TarantoolProvider::class); |
||
30 | $this->addServiceProvider(Provider\ClickhouseProvider::class); |
||
31 | |||
32 | foreach ($fs->listClasses('Provider') as $provider) { |
||
33 | $this->addServiceProvider($provider); |
||
34 | } |
||
35 | |||
36 | $this->delegate(new ReflectionContainer()); |
||
37 | } |
||
38 | |||
39 | 31 | public function dispatch(string $job, array $params = [], string $service = null) |
|
55 | |||
56 | 31 | public function get($alias, array $args = []) |
|
82 | } |
||
83 |