Skip to content

yassinebourakba/php-headfirst-design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-headfirst-design-patterns

PHP implementation for Headfirst Design Patterns book examples.

Implemented design patterns

Decorator

Class Diagram

Definition

Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.

OO Principle

Classes should be open for extension but closed for modification.

Factory

Factory Method

Class Diagram

Definition

Defines an interface for creating an object, but lets subclasses decide witch class to instantiate.

Factory Method lets a defer instantiation to subclasses.

OO Principle [Dependency Inversion]

Depend upon abstractions. Do not depend upon concrete classes.

Abstract Factory

Class Diagram

Definition

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

Singleton

Class Diagram

Definition

Ensures that a class has only one instance, and provides a global point of access to it.

About

PHP implementation for Headfirst Design Patterns book examples

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages