Add get() Method

This commit is contained in:
2025-10-25 11:29:22 -04:00
parent e0ba49d7c7
commit 46b092f7df
3 changed files with 8 additions and 3 deletions

View File

@@ -6,5 +6,5 @@ namespace Potter\Aware;
abstract class AbstractAware implements AwareInterface abstract class AbstractAware implements AwareInterface
{ {
abstract public function get(string $key): mixed;
} }

View File

@@ -6,5 +6,5 @@ namespace Potter\Aware;
interface AwareInterface interface AwareInterface
{ {
public function get(string $key): mixed;
} }

View File

@@ -6,5 +6,10 @@ namespace Potter\Aware;
trait AwareTrait trait AwareTrait
{ {
private array $aware = [];
final public function get(string $key): mixed
{
return $this->aware[$key];
}
} }