public static function get($class)
    {
        $key = strtolower($class);

        if (isset(static::$instances[$key])) {
            return static::$instances[$key];
        }

        static::override($class);

        if (!class_exists($class)) {
            throw new ReflectionException("Class $class does not exist");
        }

        $instance = static::getInstance($class);
        static::register($class, $instance);
        return $instance;
    }
public static function get($class)
    {
        $key = strtolower($class);

        if (isset(static::$instances[$key])) {
            return static::$instances[$key];
        }

        static::override($class);

        if (!class_exists($class)) {
            throw new ReflectionException("Class $class does not exist");
        }

        $instance = static::getInstance($class);
        static::register($class, $instance);
        return $instance;
    }
public static function get ( $ class ) { $ key = strtolower ( $ class ) ; if ( isset ( static :: $ instances [ $ key ] ) ) { return static :: $ instances [ $ key ] ; } static :: override ( $ class ) ; if ( ! class_exists ( $ class ) ) { throw new ReflectionException ( "Class $class does not exist" ) ; } $ instance = static :: getInstance ( $ class ) ; static :: register ( $ class , $ instance ) ; return $ instance ; }
Instantiates and registers a class
@param string $class
@return object
@throws ReflectionException
Instantiates and registers a class