Get real life storage

@return StorageInterface
194588
public function getStorage()
    {
        if ($this->hasToken()) {
            return $this->temporaryStorage->setToken($this->getToken());
        }

        return $this->storage;
    }
854725
public function build(StorageFacilityInfo $sfInfo)
    {
        $storageFacility = $this->ApplicationContext->object($sfInfo->ObjectRef);
        return $storageFacility;
    }
1014826
public function getSize()
    {
        if ($this->size === null && $this->storage->supportsSize()) {
            $this->size = $this->storage->getSize($this->key);
        }

        return $this->size;
    }
1062349
public static function getStorage($name=StorageInterface::class){
        if($name=='default')$name=StorageInterface::class;
        if(static::$storageArr[$name]){
            return static::$storageArr[$name];
        }
        $storage=Ioc::get($name);
        if(!$storage){
            throw new SystemException($name."文件存储不存在,你写个类可以继承自".StorageInterface::class);
        }else
        if($storage instanceof StorageInterface){
            static::$storageArr[$name]=new Storage($storage);
            return static::$storageArr[$name];
        }else{
            throw new SystemException($name."文件存储需要继承".StorageInterface::class);
        }
    }
306214
public function getStoragePlugins()
    {
        if (null === $this->storagePlugins) {
            $this->setStoragePlugins(new Storage\PluginManager());
        }
        return $this->storagePlugins;
    }
90342
public static function storageInstance() {
		if (self::$instance) {
			return self::$instance;
		}

		if (!isset(self::$registry[self::driver()])) {
			throw new StorageException("Invalid driver '".self::driver()."'");
		}

		$class = self::$registry[self::driver()];
		self::$instance = new $class();

		return self::$instance;
	}
1209533
public static function storage($storage = null)
    {
        if ($storage === null) {
            $storage = Config::get('cache.storage') ?: 'memory';
        }

        if (!isset(static::$storages[$storage])) {
            static::$storages[$storage] = static::factory($storage);
        }

        return static::$storages[$storage];
    }
90997
public function getStorages($type = null)
    {
        if ($type === null) {
            return $this->get('/storage');
        }

        $supportedTypes = array(
            'lvm',
            'nfs',
            'dir',
            'zfs',
            'rbd',
            'iscsi',
            'sheepdog',
            'glusterfs',
            'iscsidirect',
        );

        if (in_array($type, $supportedTypes)) {
            return $this->get('/storage', array(
                'type' => $type,
            ));
        }

        /* If type not found returns null */
        return null;
    }
1033240
public function cloud()
    {
        $name = $this->getDefaultCloudDriver();

        return $this->disks[$name] = $this->get($name);
    }
944019
public function get($name = null)
    {
        if ($name === null) {
            $name = $this->mainname;
        }
        if (!isset($this->dbs[$name])) {
            throw new Exceptions\StorageNotFound($name);
        }
        return $this->dbs[$name];
    }
451272
public function getDefaultCloudStorage(): ?Cloud
    {
        // By default, the Storage Facade does not return the
        // any actual storage fisk, but rather an
        // instance of \Illuminate\Filesystem\FilesystemManager.
        // Therefore, we make sure only to obtain its
        // "disk", to make sure that its the correct
        // instance that we obtain.
        $manager = Storage::getFacadeRoot();
        if (isset($manager)) {
            return $manager->disk();
        }
        return $manager;
    }
1350108
public function build(): GetDOMStorageItemsRequest
	{
		$instance = new GetDOMStorageItemsRequest();
		if ($this->storageId === null) {
			throw new BuilderException('Property [storageId] is required.');
		}
		$instance->storageId = $this->storageId;
		return $instance;
	}
253070
private function selectFromStorage()
    {
        if (!$this->fs->exists($this->fsPath))
        {
            return $this->getEmptyStorage();
        }

        $data = json_decode($this->fs->read($this->fsPath), true);

        if (!isset($data['pid']) || !$this->system->existsPid($data['pid']))
        {
            return $this->getEmptyStorage();
        }

        return $data;
    }
926013
public function getMemoryUsageData()
	{
		if (null === $this->memoryUsageData)
		{
			$memoryUsage = memory_get_usage();

			$unit = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];

			$this->memoryUsageData = [
				round($memoryUsage/pow(1024, ($i=floor(log($memoryUsage, 1024))) ), 2),
				$unit[$i]
			];
		}

		return $this->memoryUsageData;
	}
102730
public function getCache(string $storage = 'default'): CacheInterface
    {
        if (!isset($this->cache[$storage])) {
            if ($storage === 'default') {
                if (!isset($this->implicit['cache'])) {
                    throw new \RuntimeException('The default cache storage was not set');
                }
                $this->cache[$storage] = $this->implicit['cache'];
            } else {
                $this->cache[$storage] = $this->getCollector()->getCacheDriver($storage);
            }
        }

        return $this->cache[$storage];
    }
576508
public function getStorageModel()
    {
        if (!$this->storageModel) {
            $this->storageModel = $this->getServiceLocator()->get('HtProfileImage\StorageModel');
        }

        return $this->storageModel;
    }
382219
protected function getObject()
    {
        $object = $this->storage->getObject();
        if (!($object instanceof StoredEntity))
        {
            $object = new StoredEntity();
        }
        return $object;
    }