An open API service indexing awesome lists of open source software.

https://github.com/pavlusha311245/patternsphp

This project is a collection of design patterns, examples on how to use them, and their implementations in PHP.
https://github.com/pavlusha311245/patternsphp

patterns php

Last synced: 2 months ago
JSON representation

This project is a collection of design patterns, examples on how to use them, and their implementations in PHP.

Awesome Lists containing this project

README

        

# "PHP Design Patterns" project

This project is a collection of design patterns, examples on how to use them, and their implementations in PHP.

## Project Description

The project includes the following design patterns:

1. **Creational Patterns**
* ✅ Singleton
* ✅ Factory Method
* ✅ Abstract Factory
* ✅ Builder
* ✅ Prototype

2. **Structural Patterns**
* ✅ Adapter
* ✅ Bridge
* ❌ Composite
* ✅ Decorator
* ✅ Facade
* ❌ Flyweight
* ❌ Proxy

3. **Behavioral Patterns**
* ✅ Chain of Responsibility
* ✅ Command
* ❌ Iterator
* ❌ Mediator
* ❌ Memento
* ✅ Observer
* ✅ State
* ✅ Strategy
* ❌ Template Method
* ✅ Visitor

Each pattern is accompanied by PHP code and examples of how to use it.

## How to Install

1. Clone the repository to your local machine.
2. Open the example files and study them or copy the code you need.