dest =& $dest; $this->key = $key; } /** @var array|ArrayAccess */ protected $dest; /** @var int|string */ protected $key; function exists(): bool { return $this->key !== null && cl::has($this->dest, $this->key); } function available(): bool { return $this->exists() && $this->get() !== false; } function get($default=null) { if ($this->key === null) return $default; return cl::get($this->dest, $this->key, $default); } function set($value): void { if ($this->key === null) return; cl::set($this->dest, $this->key, $value); } function del(): void { if ($this->key === null) return; cl::del($this->dest, $this->key); } }