Skip to content

Commit

Permalink
feat: allow custom design patterns (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaulz authored Jul 27, 2023
1 parent 0dfd061 commit 0b1896c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ActionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0b1896c

Please sign in to comment.