|
@@ 123-130 (lines=8) @@
|
| 120 |
|
* @return mixed |
| 121 |
|
* @throws TypeMismatchException |
| 122 |
|
*/ |
| 123 |
|
public function getInterface(InterfaceDefinition $definition, array $args = []) { |
| 124 |
|
$abstract = $definition->getValue(); |
| 125 |
|
$interface = $definition->getId(); |
| 126 |
|
$instance = $this->resolveAbstract($abstract, $args); |
| 127 |
|
$this->matchClassType($interface, $instance); |
| 128 |
|
|
| 129 |
|
return $instance; |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
/** |
| 133 |
|
* @param IDefinition $definition |
|
@@ 140-147 (lines=8) @@
|
| 137 |
|
* @return mixed|null |
| 138 |
|
* @throws TypeMismatchException |
| 139 |
|
*/ |
| 140 |
|
public function getWildcard(IDefinition $definition, $id, $args) { |
| 141 |
|
$abstract = $definition->getValue(); |
| 142 |
|
$args['abstract'] = $id; |
| 143 |
|
$instance = $this->resolveAbstract($abstract, $args); |
| 144 |
|
$this->matchClassType($id, $instance); |
| 145 |
|
|
| 146 |
|
return $instance; |
| 147 |
|
} |
| 148 |
|
|
| 149 |
|
/** |
| 150 |
|
* @param bool $strictMode |