/** * Getter for registry * * @author Benjamin Carl <*****@*****.**> * @return Doozr_Registry The registry of Doozr * @access protected * @static */ protected static function getRegistry() { if (self::$registry === null) { self::$registry = Doozr_Registry::getInstance(); } return self::$registry; }
/** * Constructor for singleton pattern * * @author Benjamin Carl <*****@*****.**> * @return object instance/object of this class * @access public */ public static function getInstance() { // set strict to false // -> meaning: no matter which parameter given we return the same instance self::$strict = true; // get possible parameter passed to this class $arguments = func_get_args(); // decide call-type by given parameter if (empty($arguments)) { $instance = parent::getInstance(); } else { $instance = parent::getInstance($arguments); } // return instance return $instance; }