コード例 #1
0
ファイル: Rgb.class.php プロジェクト: Sect0R/WOOPS
 /**
  * Sets the needed static variables
  * 
  * @return  void
  */
 private static function _setStaticVars()
 {
     // Gets the instance of the number utilities
     self::$_number = Woops_Number_Utils::getInstance();
     // Static variables are set
     self::$_hasStatic = true;
 }
コード例 #2
0
ファイル: Utils.class.php プロジェクト: Sect0R/WOOPS
 /**
  * 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_Array_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;
 }