✏️ 编辑:SafeStorage.php
路径:
/home/boguraj1/.trash/vendor.1/league/flysystem/src/SafeStorage.php
大小:744 B · 修改:2022-10-04 02:16:36 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php namespace League\Flysystem; final class SafeStorage { /** * @var string */ private $hash; /** * @var array */ protected static $safeStorage = []; public function __construct() { $this->hash = spl_object_hash($this); static::$safeStorage[$this->hash] = []; } public function storeSafely($key, $value) { static::$safeStorage[$this->hash][$key] = $value; } public function retrieveSafely($key) { if (array_key_exists($key, static::$safeStorage[$this->hash])) { return static::$safeStorage[$this->hash][$key]; } } public function __destruct() { unset(static::$safeStorage[$this->hash]); } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF