From 46b092f7df325c0ffd7711713995e54622b53759 Mon Sep 17 00:00:00 2001 From: Jay Potter Date: Sat, 25 Oct 2025 11:29:22 -0400 Subject: [PATCH] Add get() Method --- src/Potter/Aware/AbstractAware.php | 2 +- src/Potter/Aware/AwareInterface.php | 2 +- src/Potter/Aware/AwareTrait.php | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Potter/Aware/AbstractAware.php b/src/Potter/Aware/AbstractAware.php index 953dad2..a4ba4b1 100644 --- a/src/Potter/Aware/AbstractAware.php +++ b/src/Potter/Aware/AbstractAware.php @@ -6,5 +6,5 @@ namespace Potter\Aware; abstract class AbstractAware implements AwareInterface { - + abstract public function get(string $key): mixed; } diff --git a/src/Potter/Aware/AwareInterface.php b/src/Potter/Aware/AwareInterface.php index 34e8a8f..5536f31 100644 --- a/src/Potter/Aware/AwareInterface.php +++ b/src/Potter/Aware/AwareInterface.php @@ -6,5 +6,5 @@ namespace Potter\Aware; interface AwareInterface { - + public function get(string $key): mixed; } diff --git a/src/Potter/Aware/AwareTrait.php b/src/Potter/Aware/AwareTrait.php index 1bdce1f..115fbb7 100644 --- a/src/Potter/Aware/AwareTrait.php +++ b/src/Potter/Aware/AwareTrait.php @@ -6,5 +6,10 @@ namespace Potter\Aware; trait AwareTrait { - + private array $aware = []; + + final public function get(string $key): mixed + { + return $this->aware[$key]; + } }