1 | <?php |
||
15 | final class Autowire |
||
16 | { |
||
17 | /** |
||
18 | * Delegation target |
||
19 | * |
||
20 | * @var mixed |
||
21 | */ |
||
22 | private $alias; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private $parameters = []; |
||
28 | |||
29 | /** |
||
30 | * Autowire constructor. |
||
31 | * |
||
32 | * @param string $alias |
||
33 | * @param array $parameters |
||
34 | */ |
||
35 | 2 | public function __construct(string $alias, array $parameters = []) |
|
40 | |||
41 | /** |
||
42 | * @param FactoryInterface $factory |
||
43 | * @param array $parameters Context specific parameters (always prior to declared |
||
44 | * ones). |
||
45 | * |
||
46 | * @return mixed |
||
47 | * |
||
48 | * @throws \Spiral\Core\Exceptions\Container\AutowireException No entry was found for this |
||
49 | * identifier. |
||
50 | 1 | * @throws \Interop\Container\Exception\ContainerException Error while retrieving the entry. |
|
51 | */ |
||
52 | 1 | public function resolve( |
|
58 | |||
59 | /** |
||
60 | * @param $an_array |
||
61 | * |
||
62 | * @return static |
||
63 | */ |
||
64 | public static function __set_state($an_array) |
||
68 | } |