getInstance() public static method

Return the current object instance (Singleton)
public static getInstance ( ) : static
return static The object instance
 /**
  * Adds the summary data.
  */
 private function addSummaryData()
 {
     $framework = false;
     $modelCount = '0';
     if (isset($GLOBALS['TL_DEBUG'])) {
         $framework = true;
         $modelCount = Registry::getInstance()->count();
     }
     $this->data['summary'] = ['version' => $this->getContaoVersion(), 'framework' => $framework, 'models' => $modelCount, 'frontend' => isset($GLOBALS['objPage']), 'preview' => defined('BE_USER_LOGGED_IN') && true === BE_USER_LOGGED_IN, 'layout' => $this->getLayoutName(), 'template' => $this->getTemplateName()];
 }
 /**
  * Adds the summary data.
  */
 private function addSummaryData()
 {
     $framework = false;
     $modelCount = '0';
     if (isset($GLOBALS['TL_DEBUG'])) {
         $framework = true;
         $modelCount = Registry::getInstance()->count();
     }
     $this->data['summary'] = ['version' => $this->getContaoVersion(), 'scope' => $this->getContainerScope(), 'layout' => $this->getLayoutName(), 'framework' => $framework, 'models' => $modelCount];
 }