Servant design pattern in PHP

Servant design pattern is a behavioral design pattern where multiple classes use the servantโ€™s class behavior to avoid repeating code (see: DRY). Behavior functionality is defined only in one place: In servant.

The servant design pattern is not a defined pattern in the Gang of Four (GoF) book. It is very similar to the command design pattern but with a somewhat different solution to the problem.

Servant design pattern UML

See also