Dmyers\Storage\Storage::instance PHP Method

instance() public static method

public static instance ( $name = null )
    public static function instance($name = null)
    {
        if (empty($name)) {
            $name = static::config('default', 'Local');
        }
        if (isset(static::$instances[$name])) {
            return static::$instances[$name];
        }
        $adapter = static::adapter($name);
        $instance = new static();
        $instance->setAdapter($adapter);
        static::$instances[$name] = $instance;
        return $instance;
    }