New answers tagged

0

Your is not a proper way for builder pattern in PHP. Here is the example for Builder pattern in PHP, <?php namespace RefactoringGuru\Builder\Conceptual; /** * The Builder interface specifies methods for creating the different parts of * the Product objects. */ interface Builder { public function producePartA(): void; public function ...


4

The Other Builder Pattern First, let me just briefly mention that there's a different pattern under the same name: Joshua Bloch's Builder pattern described in Effective Java (see the excerpt here). This pattern was inspired by the GoF Builder pattern; however, it's purpose/intent is not the same - it solves a different problem, so, despite what that ...


Top 50 recent answers are included