*/
private static $selfInstance = null;
+ /**
+ * Wether the registry is initialized
+ */
+ private static $initialized = false;
+
/**
* Instance registry
*/
return self::$selfInstance;
}
+ /**
+ * Checks or sets wether the registry has been initialized. This had only be done once
+ *
+ * @param $initialized Wether the registry is initialized
+ * @return $initialized Wether the registry is initialized
+ */
+ public final static function isInitialized ($initialized = null) {
+ if (is_null($initialized)) {
+ // Get status if initialized
+ return self::$initialized;
+ } elseif (!is_null($initialized)) {
+ // Registry is initialized!
+ self::$initialized = true;
+ }
+ }
+
/**
* Checks wether an instance key was found
*