Implement Aware
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
"name": "potter/nameable",
|
||||
"type": "library",
|
||||
"require": {
|
||||
"php": "^8.4"
|
||||
"php": "^8.4",
|
||||
"potter/aware": "dev-main"
|
||||
},
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
|
||||
@@ -4,7 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace Potter\Nameable;
|
||||
|
||||
interface NameableInterface
|
||||
use \Potter\Aware\AwareInterface;
|
||||
|
||||
interface NameableInterface extends AwareInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user