From 0b1896c69d7977058ef2a63fb37a8ed0f6d71a9a Mon Sep 17 00:00:00 2001 From: Julian Hundeloh <5358638+jaulz@users.noreply.github.com> Date: Thu, 27 Jul 2023 22:29:23 +0200 Subject: [PATCH] feat: allow custom design patterns (#248) --- src/ActionManager.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ActionManager.php b/src/ActionManager.php index 77a4005..574534d 100755 --- a/src/ActionManager.php +++ b/src/ActionManager.php @@ -70,6 +70,13 @@ public function getDesignPatterns(): array return $this->designPatterns; } + public function registerDesignPattern(DesignPattern $designPattern): ActionManager + { + $this->designPatterns[] = $designPattern; + + return $this; + } + public function getDesignPatternsMatching(array $usedTraits): array { $filter = function (DesignPattern $designPattern) use ($usedTraits) {