定制 domnikl/design-patterns-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

domnikl/design-patterns-php

Composer 安装命令:

composer require domnikl/design-patterns-php

包简介

Sample code for several design patterns in PHP

README 文档

README

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.

Creational

Structural

Behavioral

More

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 📓

统计信息

  • 总下载量: 1.17k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20865
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 20862
  • Watchers: 1226
  • Forks: 4464
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-05