2017 © Pedro Peláez
 

library designpatterns

PHP Design Patterns

image

rpodwika/designpatterns

PHP Design Patterns

  • Wednesday, June 15, 2016
  • by rpodwika
  • Repository
  • 1 Watchers
  • 9 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 23 Versions
  • 0 % Grown

The README.md

Design Patterns for PHP

Build Status Coverage Status Dependency Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Why

For my own pratice and to help other programmers I decided to implement several Design Patterns in PHP. I hope you like it and you will find it helpful. If you have any suggestions how can I write something better please create pull request or message me, (*2)

What are design patterns

Design problems are proven to work solutions for problems that often occur while writing applications., (*3)

Why to use them

Because they solve problems. You do not need to invent solution that is already working. How many times during your programmer career you had this feeling that you already solved problem that you are facing now? Same goes with patterns you have problem that could be solved using specific pattern. Keep in mind that you should not force your code to fit in patterns. It should come out naturally. Firstly K.I.S.S., (*4)

Implemented patterns

  1. Antipatterns
  2. Behavioral
    • Adapter - adapt class behavior to new conditions without modifying source of original class
    • Chain of responsibility - Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request
    • Memento - Without violating encapsulation, capture and externalize an object's internal state
    • Observer - Define one to many dependency between objects so that when one changes state, all its dependents are notified and updated automatically
    • Proxy - Do some operations before giving access to origin object
    • State - allow object to alter its behavior depending on current internal state change.
    • Strategy - Define a family of algorithms and make them interchangeable.
  3. Creational
    • Abstract Factory - Provides interface for creating families of objects working together without specification of concrete classes
    • Factory - Define an interface for creating an object but let the subclasses decide which class to instantiate
  4. Structural
    • Decorator - Attach additional object features dynamically without subclassing or modifying source class.

To be implemented

  • Builder
  • Prototype
  • Bridge
  • Composite
  • Facade
  • Flyweight
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Visitor

The Versions

15/06 2016

dev-master

9999999-dev

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

15/06 2016

dev-develop

dev-develop

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

15/06 2016

1.10.0

1.10.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

13/06 2016

1.9.1

1.9.1.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

16/07 2015

1.8.0

1.8.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

16/07 2015

1.7.0

1.7.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

15/07 2015

1.6.0

1.6.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

14/07 2015

1.5.1

1.5.1.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

14/07 2015

1.5.0

1.5.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

10/07 2015

1.4.0

1.4.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

10/07 2015

1.3.3

1.3.3.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

10/07 2015

1.3.2

1.3.2.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

10/07 2015

1.3.1

1.3.1.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

09/07 2015

1.3.0

1.3.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

09/07 2015

1.2.1

1.2.1.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

09/07 2015

1.2.0

1.2.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

06/07 2015

1.1.3

1.1.3.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

06/07 2015

1.1.2

1.1.2.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

06/07 2015

1.1.1

1.1.1.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

05/07 2015

1.1.0

1.1.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

05/07 2015

1.0.2

1.0.2.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

05/07 2015

1.0.1

1.0.1.0

PHP Design Patterns

  Sources   Download

GPL

The Requires

 

05/07 2015

1.0.0

1.0.0.0

PHP Design Patterns

  Sources   Download

GPL

The Requires