PHP Classes

How to Use a Collection a PHP Design Pattern Implementations as Classes Using the Package Desired Patterns: Implements of several modern design patterns

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-01-02 (3 months ago) RSS 2.0 feedNot enough user ratingsTotal: 26 This week: 3All time: 11,235 This week: 20Up
Version License PHP version Categories
desired-patterns 1.0.0Custom (specified...8.2Algorithms, Design Patterns, PHP 8
Description 

Author

This package implements several modern design patterns.

It provides a collection of classes that implement well-known design patterns.

Currently, it provides classes that implement:

- Singleton and Multiton patterns to ensure a class has only one instance

- Command pattern to encapsulate a request as an object

- Chain of Responsibility pattern to pass requests along a chain of handlers

- Registry pattern to provide a global point of access to objects or services throughout an application

- Service Locator pattern to encapsulate the processes involved in obtaining a service

- Specification pattern to create business rules that can be combined using boolean logic.

- Strategy pattern to define a family of interchangeable algorithms

Innovation Award
PHP Programming Innovation award winner
January 2025
Winner
Design patterns are common solutions for problems developers need to solve when implementing their software applications.

There are many design patterns and there will be more when developers discover more patterns to simplify the development of their applications.

This package provides a PHP implementation of several design patterns. Some are older and others are more recent, like the Specification pattern.

Manuel Lemos
Picture of Carlos Artur Curvelo da Matos
  Performance   Level  
Innovation award
Innovation award
Nominee: 18x

Winner: 4x

 

  Files folder image Files (90)  
File Role Description
Files folder image.github (1 directory)
Files folder imageexamples (6 directories)
Files folder imagesrc (12 directories)
Files folder imagetests (2 files, 12 directories)
Accessible without login Plain text file .phpcs-cache Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpcs.xml Data Auxiliary data
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:26
This week:3
All time:11,235
This week:20Up