Go\Instrument\ClassLoading\AopComposerLoader::wasInitialized PHP Method

wasInitialized() public static method

Whether or not loader was initialized
public static wasInitialized ( ) : boolean
return boolean
    public static function wasInitialized()
    {
        return self::$wasInitialized;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function boot()
 {
     // it is a quick way to check if loader was enabled
     $wasDebugEnabled = class_exists('\\Symfony\\Component\\Debug\\DebugClassLoader', false);
     if ($wasDebugEnabled) {
         // disable temporary to apply AOP loader first
         DebugClassLoader::disable();
     }
     $this->container->get('goaop.aspect.container');
     if (!AopComposerLoader::wasInitialized()) {
         throw new \RuntimeException("Initialization of AOP loader was failed, probably due to Debug::enable()");
     }
     if ($wasDebugEnabled) {
         DebugClassLoader::enable();
     }
 }