X

Create New Item

File Folder

X

Search Results

File "StaticInMemoryAdapterRegistry.php"

Full path: /home/orbitecv/orbite-school.orbit.et/vendor/league/flysystem/src/InMemory/StaticInMemoryAdapterRegistry.php
File size: 465 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Edit   Back

<?php

namespace League\Flysystem\InMemory;

class StaticInMemoryAdapterRegistry
{
    /** @var array<string, InMemoryFilesystemAdapter> */
    private static array $filesystems = [];

    public static function get(string $name = 'default'): InMemoryFilesystemAdapter
    {
        return static::$filesystems[$name] ??= new InMemoryFilesystemAdapter();
    }

    public static function deleteAllFilesystems(): void
    {
        self::$filesystems = [];
    }
}