reader = $reader; $this->writer = $writer; $this->getter = $reader; } protected IAccess $reader; protected IAccess $writer; protected IGetter $getter; function exists(): bool { return $this->getter->exists(); } function available(): bool { return $this->getter->available(); } function get($default=null) { return $this->getter->get($default); } function set($value): void { $this->writer->set($value); $this->getter = $this->writer; } public function del(): void { $this->writer->del(); $this->getter = $this->reader; } }