Go\Core\AspectKernel::getInstance PHP Method

getInstance() public static method

Returns the single instance of kernel
public static getInstance ( ) : static
return static
    public static function getInstance()
    {
        if (!self::$instance) {
            self::$instance = new static();
        }
        return self::$instance;
    }

Usage Example

 /**
  * Returns an annotation reader
  *
  * @return Reader $reader
  */
 private static function getReader()
 {
     if (!self::$annotationReader) {
         self::$annotationReader = AspectKernel::getInstance()->getContainer()->get('aspect.annotation.reader');
     }
     return self::$annotationReader;
 }
All Usage Examples Of Go\Core\AspectKernel::getInstance