forked from Dhii/containers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceProvider.php
More file actions
50 lines (43 loc) · 957 Bytes
/
ServiceProvider.php
File metadata and controls
50 lines (43 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
declare(strict_types=1);
namespace Dhii\Container;
use Interop\Container\ServiceProviderInterface;
/**
* A value object capable of providing services.
*
* @package Dhii\Di
*/
class ServiceProvider implements ServiceProviderInterface
{
/**
* @var callable[]
*/
protected $factories;
/**
* @var callable[]
*/
protected $extensions;
/**
* @param callable[] $factories A map of service name to service factory.
* @param callable[] $extensions A map of service name to service extension.
*/
public function __construct(array $factories, array $extensions)
{
$this->factories = $factories;
$this->extensions = $extensions;
}
/**
* {@inheritDoc}
*/
public function getFactories()
{
return $this->factories;
}
/**
* {@inheritDoc}
*/
public function getExtensions()
{
return $this->extensions;
}
}