Skip to content

nggiahao1999/DesignPatternsPHP

This branch is 2 commits ahead of, 43 commits behind DesignPatternsPHP/DesignPatternsPHP:main.

Folders and files

NameName
Last commit message
Last commit date
Sep 1, 2020
Jun 16, 2022
Jul 19, 2022
Jun 19, 2022
Jun 16, 2022
Jan 7, 2022
Aug 19, 2019
Aug 23, 2019
Apr 12, 2021
Jan 3, 2022
Apr 3, 2020
Oct 14, 2021
Dec 14, 2021
Sep 12, 2019
Oct 15, 2021
Oct 15, 2021
Sep 1, 2020
Oct 7, 2020
Oct 1, 2021
Aug 17, 2019
Apr 12, 2021

Repository files navigation

DesignPatternsPHP

Build Status Documentation Status Donate

Read the Docs of DesignPatternsPHP or Download as PDF/Epub

This is a collection of known design patterns and some sample codes on how to implement them in PHP. Every pattern has a small list of examples.

I think the problem with patterns is that often people do know them but don't know when to apply which.

Installation

You should look at and run the tests to see what happens in the example. To do this, you should install dependencies with Composer first:

$ composer install

Read more about how to install and use Composer on your local machine here.

To run the tests use phpunit:

$ ./vendor/bin/phpunit

Using Docker (optional)

You can optionally build and browse the documentation using Docker for Mac, Windows or Linux.

Just run:

$ docker-compose up --build

Go to http://localhost:8080/ to read the generated documentation.

If you want to localize your documentation you can pass the locale as an argument to the docker build:

$ docker-compose build --build-arg language=de
$ docker-compose up

Patterns

The patterns can be structured in roughly three different categories. Please click on the πŸ““ for a full explanation of the pattern on Wikipedia.

Localization & Supported Languages

Code Language Documentation
ca Catalan Docs πŸ““
zh_CN Chinese Docs πŸ““
nl Dutch Docs πŸ““
en English Docs πŸ““
de German Docs πŸ““
ja Japanese Docs πŸ““
pl Polish Docs πŸ““
pt_BR Portuguese-Brazil Docs πŸ““
ru Russian Docs πŸ““
es Spanish Docs πŸ““
es_MX Spanish-Mexican Docs πŸ““
tr Turkish Docs πŸ““
bg Bulgarian Docs πŸ““
fr French Docs πŸ““
it Italian Docs πŸ““

About

sample code for several design patterns in PHP

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 85.2%
  • Python 8.0%
  • Makefile 6.3%
  • Dockerfile 0.5%