This repository was archived by the owner on Mar 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerInterface.php
More file actions
69 lines (59 loc) · 1.66 KB
/
ContainerInterface.php
File metadata and controls
69 lines (59 loc) · 1.66 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
namespace Wandu\DI;
use ArrayAccess;
use Psr\Container\ContainerInterface as PsrContainerInterface;
interface ContainerInterface extends ArrayAccess, PsrContainerInterface
{
/**
* @param string $name
* @param string $package
* @return mixed
* @throws \Wandu\DI\Exception\RequirePackageException
*/
public function assert(string $name, string $package);
/**
* @param string[] ...$names
* @return void
*/
public function destroy(...$names);
/**
* @param string $className
* @param mixed $value
* @return \Wandu\DI\ContainerFluent
*/
public function instance(string $className, $value): ContainerFluent;
/**
* @param string $name
* @param string|\Closure $className
* @return \Wandu\DI\ContainerFluent
*/
public function bind(string $name, $className = null): ContainerFluent;
/**
* @param string $alias
* @param string $target
* @return void
*/
public function alias(string $alias, string $target);
/**
* @param string $name
* @return \Wandu\DI\ContainerFluent
*/
public function descriptor(string $name): ContainerFluent;
/**
* @param array $arguments
* @return \Wandu\DI\ContainerInterface
*/
public function with(array $arguments = []): ContainerInterface;
/**
* @param string $className
* @param array $arguments
* @return object
*/
public function create(string $className, array $arguments = []);
/**
* @param callable $callee
* @param array $arguments
* @return mixed
*/
public function call(callable $callee, array $arguments = []);
}