Dmyers\Storage\Storage::instance PHP Метод

instance() публичный статический Метод

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;
    }