@@ 40-55 (lines=16) @@ | ||
37 | /** |
|
38 | * {@inheritdoc} |
|
39 | */ |
|
40 | public function boot() |
|
41 | { |
|
42 | // it is a quick way to check if loader was enabled |
|
43 | $wasDebugEnabled = class_exists('\Symfony\Component\Debug\DebugClassLoader', false); |
|
44 | if ($wasDebugEnabled) { |
|
45 | // disable temporary to apply AOP loader first |
|
46 | DebugClassLoader::disable(); |
|
47 | } |
|
48 | $this->container->get('goaop.aspect.container'); |
|
49 | if (!AopComposerLoader::wasInitialized()) { |
|
50 | throw new \RuntimeException("Initialization of AOP loader was failed, probably due to Debug::enable()"); |
|
51 | } |
|
52 | if ($wasDebugEnabled) { |
|
53 | DebugClassLoader::enable(); |
|
54 | } |
|
55 | } |
|
56 | } |
|
57 |
@@ 38-54 (lines=17) @@ | ||
35 | * |
|
36 | * @inheritDoc |
|
37 | */ |
|
38 | public function init(array $options = []) |
|
39 | { |
|
40 | // it is a quick way to check if loader was enabled |
|
41 | $wasDebugEnabled = class_exists('\Symfony\Component\Debug\DebugClassLoader', false); |
|
42 | if ($wasDebugEnabled) { |
|
43 | // disable temporary to apply AOP loader first |
|
44 | DebugClassLoader::disable(); |
|
45 | } |
|
46 | parent::init($options); |
|
47 | ||
48 | if (!AopComposerLoader::wasInitialized()) { |
|
49 | throw new \RuntimeException("Initialization of AOP loader was failed, probably due to Debug::enable()"); |
|
50 | } |
|
51 | if ($wasDebugEnabled) { |
|
52 | DebugClassLoader::enable(); |
|
53 | } |
|
54 | } |
|
55 | } |
|
56 |