Skip to content

Latest commit

History

History
17 lines (12 loc) 路 815 Bytes

File metadata and controls

17 lines (12 loc) 路 815 Bytes

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