diff --git a/composer.json b/composer.json index ec80d81..42b96a8 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,8 @@ "name": "potter/nameable", "type": "library", "require": { - "php": "^8.4" + "php": "^8.4", + "potter/aware": "dev-main" }, "license": "MIT", "autoload": { diff --git a/src/Potter/Nameable/NameableInterface.php b/src/Potter/Nameable/NameableInterface.php index 0dc8d04..06c15b0 100644 --- a/src/Potter/Nameable/NameableInterface.php +++ b/src/Potter/Nameable/NameableInterface.php @@ -4,7 +4,9 @@ declare(strict_types=1); namespace Potter\Nameable; -interface NameableInterface +use \Potter\Aware\AwareInterface; + +interface NameableInterface extends AwareInterface { } diff --git a/src/Potter/Nameable/NameableTrait.php b/src/Potter/Nameable/NameableTrait.php index 2eb5281..9671872 100644 --- a/src/Potter/Nameable/NameableTrait.php +++ b/src/Potter/Nameable/NameableTrait.php @@ -4,7 +4,14 @@ declare(strict_types=1); namespace Potter\Nameable; +use \Potter\Aware\AwareInterface; + trait NameableTrait { - + abstract public function get(string $key): mixed; + abstract public function has(string $key): bool; + abstract protected function set(string $key, mixed $value): mixed; + abstract protected function unset(string $key): void; + abstract public function with(string $key, mixed $value): AwareInterface; + abstract public function without(string $key): AwareInterface; }