public static function getInstanceWithSingleton($class_name)
    {
        // is a singleton instance?
        if (NULL != ($instance = self::getSingleton($class_name))) {
            return $instance;
        }

        $instance = self::getInstance($class_name);
        self::singleton($instance);

        return $instance;
    }
public static function getInstanceWithSingleton($class_name)
    {
        // is a singleton instance?
        if (NULL != ($instance = self::getSingleton($class_name))) {
            return $instance;
        }

        $instance = self::getInstance($class_name);
        self::singleton($instance);

        return $instance;
    }
public static function getInstanceWithSingleton ( $ class_name ) { // is a singleton instance? if ( NULL != ( $ instance = self :: getSingleton ( $ class_name ) ) ) { return $ instance ; } $ instance = self :: getInstance ( $ class_name ) ; self :: singleton ( $ instance ) ; return $ instance ; }
get Instance, if instance is not singleton, set it to singleton.

@param  string  $class_name
@return object
get Instance if instance is not singleton set it to singleton .