Add unset() Method
This commit is contained in:
@@ -9,4 +9,5 @@ abstract class AbstractAware implements AwareInterface
|
|||||||
abstract public function get(string $key): mixed;
|
abstract public function get(string $key): mixed;
|
||||||
abstract public function has(string $key): bool;
|
abstract public function has(string $key): bool;
|
||||||
abstract protected function set(string $key, mixed $value): mixed;
|
abstract protected function set(string $key, mixed $value): mixed;
|
||||||
|
abstract protected function unset(string $key): void;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,5 +25,10 @@ trait AwareTrait
|
|||||||
return $this->aware[$key] = $value;
|
return $this->aware[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final protected function unset(string $key): void
|
||||||
|
{
|
||||||
|
unset($this->aware[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
abstract public function clone(): CloneableInterface;
|
abstract public function clone(): CloneableInterface;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user