Example #1
0
 /**
  * {@inheritdoc}
  */
 public static function getInstance()
 {
     // get the current environment via the active request instance
     if ($request = \Request::getActive()) {
         return $request->getComponent()->getApplication()->getEnvironment();
     }
     // no active request, return the main applications' environment
     return \Application::getInstance()->getEnvironment();
 }