Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 2.88 KB

README.md

File metadata and controls

79 lines (62 loc) · 2.88 KB

PHP Design Patterns

Introduction

This repository contains examples of design patterns in PHP. The examples are based on the book Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.

Table of Contents

Creational Patterns

Abstract Factory

The Abstract Factory pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.

Builder

The Builder pattern is used to separate the construction of a complex object from its representation so that the same construction process can create different representations.

Examples

  1. Conceptual Example

Factory Method

The Factory Method pattern defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.

License

MIT License (MIT) - see the LICENSE file for more details.

Author Information

This repository is owned and maintained by Muhammad Gulzab. If you would like to contact me.