@@ 20-36 (lines=17) @@ | ||
17 | * @version 1.0 |
|
18 | * @since 1.0 |
|
19 | */ |
|
20 | class ConsoleResolverInjector extends Injector |
|
21 | { |
|
22 | /** |
|
23 | * @return bool |
|
24 | * @throws Exception |
|
25 | */ |
|
26 | public function build() |
|
27 | { |
|
28 | $consoleResolver = parent::get('consoleResolver'); |
|
29 | ||
30 | if (!($consoleResolver instanceof IResolver)) { |
|
31 | throw new Exception('Component `resolver` not configured'); |
|
32 | } |
|
33 | ||
34 | return $consoleResolver; |
|
35 | } |
|
36 | } |
@@ 20-36 (lines=17) @@ | ||
17 | * @version 1.0 |
|
18 | * @since 1.0 |
|
19 | */ |
|
20 | class ResolverInjector extends Injector |
|
21 | { |
|
22 | /** |
|
23 | * @return bool |
|
24 | * @throws Exception |
|
25 | */ |
|
26 | public function build() |
|
27 | { |
|
28 | $resolver = parent::get('resolver'); |
|
29 | ||
30 | if (!($resolver instanceof IResolver)) { |
|
31 | throw new Exception('Component `resolver` not configured'); |
|
32 | } |
|
33 | ||
34 | return $resolver; |
|
35 | } |
|
36 | } |