| 1 | <?php |
||
| 5 | class ConcreteDefinition implements DefinitionInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | private $alias; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var mixed |
||
| 14 | */ |
||
| 15 | private $concrete; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor. |
||
| 19 | * |
||
| 20 | * @param string $alias |
||
| 21 | * @param mixed $concrete |
||
| 22 | */ |
||
| 23 | 12 | public function __construct($alias, & $concrete) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Handle instantiation and manipulation of value and return. |
||
| 31 | * |
||
| 32 | * @param array $args |
||
| 33 | * @return mixed |
||
| 34 | */ |
||
| 35 | 6 | public function & build(array $args = []) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Add an argument to be injected. |
||
| 42 | * |
||
| 43 | * @param mixed $arg |
||
| 44 | * @return $this |
||
| 45 | */ |
||
| 46 | public function withArgument($arg) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Add multiple arguments to be injected. |
||
| 53 | * |
||
| 54 | * @param array $args |
||
| 55 | * @return $this |
||
| 56 | */ |
||
| 57 | public function withArguments(array $args) |
||
| 61 | } |