December 2016
Beginner to intermediate
238 pages
6h 10m
English
© Kelt Dockins 2017
Kelt Dockins, Design Patterns in PHP and Laravel, 10.1007/978-1-4842-2451-9_3
Kelt Dockins1
(1)Dolph, Arkansas, USA
$> git checkout abstract_factoryProvide an interface for creating families of related or dependent objects without specifying their concrete classes.1
When you have a family of objects that are somewhat related, you can use a factory to create products. Sometimes you want to create variations of a product. A product could be any class. It could be a User, Airplane, or House. When dealing with real estate, commercial is different than residential. In this case, you might create two factories: one for commercial and one for residential. The residential factory could produce ...
Read now
Unlock full access