Exemple #1
0
 /**
  * Gets the unique class instance
  * 
  * This method is used to get the unique instance of the class
  * (singleton). If no instance is available, it will create it.
  * 
  * @return  Woops_Time_Utils    The unique instance of the class
  * @see     __construct
  */
 public static function getInstance()
 {
     // Checks if the unique instance already exists
     if (!is_object(self::$_instance)) {
         // Creates the unique instance
         self::$_instance = new self();
     }
     // Returns the unique instance
     return self::$_instance;
 }
Exemple #2
0
 /**
  * Sets the needed static variables
  * 
  * @return  void
  */
 private static function _setStaticVars()
 {
     // Gets the available modules
     self::$_modules = Woops_Core_Module_Manager::getInstance()->getAvailableModules();
     // Gets the available timezones
     self::$_timezones = Woops_Time_Utils::getInstance()->getTimezones();
     // Gets the available languages
     self::$_languages = Woops_Locale_Helper::getInstance()->getLanguages();
     // Gets the available database engines
     self::$_engines = Woops_Database_Layer::getInstance()->getRegisteredEngines();
     // Static variables are set
     self::$_hasStatic = true;
 }