{"id":28413391,"url":"https://github.com/vikbert/design-pattern-php8","last_synced_at":"2025-06-24T20:30:51.697Z","repository":{"id":54969285,"uuid":"445597946","full_name":"vikbert/design-pattern-php8","owner":"vikbert","description":"Design Pattern in PHP8","archived":false,"fork":false,"pushed_at":"2022-01-07T18:05:40.000Z","size":1762,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-03T15:26:40.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vikbert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-07T17:17:29.000Z","updated_at":"2022-08-09T01:53:39.000Z","dependencies_parsed_at":"2022-08-14T07:40:51.984Z","dependency_job_id":null,"html_url":"https://github.com/vikbert/design-pattern-php8","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vikbert/design-pattern-php8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikbert%2Fdesign-pattern-php8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikbert%2Fdesign-pattern-php8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikbert%2Fdesign-pattern-php8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikbert%2Fdesign-pattern-php8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikbert","download_url":"https://codeload.github.com/vikbert/design-pattern-php8/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikbert%2Fdesign-pattern-php8/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261751429,"owners_count":23204421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-03T04:34:03.020Z","updated_at":"2025-06-24T20:30:51.681Z","avatar_url":"https://github.com/vikbert.png","language":"PHP","funding_links":["https://paypal.me/DominikLiebler"],"categories":[],"sub_categories":[],"readme":"# DesignPatternsPHP\n\n[![Build Status](https://github.com/domnikl/DesignPatternsPHP/workflows/CI/badge.svg)](https://github.com/domnikl/DesignPatternsPHP/actions)\n[![Documentation Status](https://readthedocs.org/projects/designpatternsphp/badge/?version=latest)](https://readthedocs.org/projects/designpatternsphp/?badge=latest)\n[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/DominikLiebler)\n\n[Read the Docs of DesignPatternsPHP](http://designpatternsphp.readthedocs.org)\nor [Download as PDF/Epub](https://readthedocs.org/projects/designpatternsphp/downloads/)\n\nThis 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.\n\nI think the problem with patterns is that often people do know them but don't know when to apply which.\n\n## Installation\nYou should look at and run the tests to see what happens in the example.\nTo do this, you should install dependencies with `Composer` first:\n\n```bash\n$ composer install\n```\n\nRead more about how to install and use `Composer` on your local machine [here](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).\n\nTo run the tests use `phpunit`:\n\n```bash\n$ ./vendor/bin/phpunit\n```\n\n## Using Docker (optional)\n\nYou can optionally build and browse the documentation using [Docker for Mac, Windows or Linux](https://docs.docker.com/compose/install/).\n\nJust run:\n\n```bash\n$ docker-compose up --build\n```\n\nGo to [http://localhost:8080/](http://localhost:8080/) to read the generated documentation.\n\nIf you want to localize your documentation you can pass the locale as an argument to the docker build:\n\n```bash\n$ docker-compose build --build-arg language=de\n$ docker-compose up\n```\n\n## Patterns\n\nThe patterns can be structured in roughly three different categories. Please click on the [:notebook:](http://en.wikipedia.org/wiki/Software_design_pattern) for a full explanation of the pattern on Wikipedia.\n\n### [Creational](Creational)\n\n* [AbstractFactory](Creational/AbstractFactory) [:notebook:](http://en.wikipedia.org/wiki/Abstract_factory_pattern)\n* [Builder](Creational/Builder) [:notebook:](http://en.wikipedia.org/wiki/Builder_pattern)\n* [FactoryMethod](Creational/FactoryMethod) [:notebook:](http://en.wikipedia.org/wiki/Factory_method_pattern)\n* [Pool](Creational/Pool) [:notebook:](http://en.wikipedia.org/wiki/Object_pool_pattern)\n* [Prototype](Creational/Prototype) [:notebook:](http://en.wikipedia.org/wiki/Prototype_pattern)\n* [SimpleFactory](Creational/SimpleFactory)\n* [Singleton](Creational/Singleton) [:notebook:](http://en.wikipedia.org/wiki/Singleton_pattern)\n* [StaticFactory](Creational/StaticFactory)\n\n### [Structural](Structural)\n\n* [Adapter](Structural/Adapter) [:notebook:](http://en.wikipedia.org/wiki/Adapter_pattern)\n* [Bridge](Structural/Bridge) [:notebook:](http://en.wikipedia.org/wiki/Bridge_pattern)\n* [Composite](Structural/Composite) [:notebook:](http://en.wikipedia.org/wiki/Composite_pattern)\n* [DataMapper](Structural/DataMapper) [:notebook:](http://en.wikipedia.org/wiki/Data_mapper_pattern)\n* [Decorator](Structural/Decorator) [:notebook:](http://en.wikipedia.org/wiki/Decorator_pattern)\n* [DependencyInjection](Structural/DependencyInjection) [:notebook:](http://en.wikipedia.org/wiki/Dependency_injection)\n* [Facade](Structural/Facade) [:notebook:](http://en.wikipedia.org/wiki/Facade_pattern)\n* [FluentInterface](Structural/FluentInterface) [:notebook:](http://en.wikipedia.org/wiki/Fluent_interface)\n* [Flyweight](Structural/Flyweight) [:notebook:](https://en.wikipedia.org/wiki/Flyweight_pattern)\n* [Proxy](Structural/Proxy) [:notebook:](http://en.wikipedia.org/wiki/Proxy_pattern)\n* [Registry](Structural/Registry) [:notebook:](http://en.wikipedia.org/wiki/Service_locator_pattern)\n\n### [Behavioral](Behavioral)\n\n* [ChainOfResponsibilities](Behavioral/ChainOfResponsibilities) [:notebook:](http://en.wikipedia.org/wiki/Chain_of_responsibility_pattern)\n* [Command](Behavioral/Command) [:notebook:](http://en.wikipedia.org/wiki/Command_pattern)\n* [Interpreter](Behavioral/Interpreter) [:notebook:](https://en.wikipedia.org/wiki/Interpreter_pattern)  \n* [Iterator](Behavioral/Iterator) [:notebook:](http://en.wikipedia.org/wiki/Iterator_pattern)\n* [Mediator](Behavioral/Mediator) [:notebook:](http://en.wikipedia.org/wiki/Mediator_pattern)\n* [Memento](Behavioral/Memento) [:notebook:](http://en.wikipedia.org/wiki/Memento_pattern)\n* [NullObject](Behavioral/NullObject) [:notebook:](http://en.wikipedia.org/wiki/Null_Object_pattern)\n* [Observer](Behavioral/Observer) [:notebook:](http://en.wikipedia.org/wiki/Observer_pattern)\n* [Specification](Behavioral/Specification) [:notebook:](http://en.wikipedia.org/wiki/Specification_pattern)\n* [State](Behavioral/State) [:notebook:](http://en.wikipedia.org/wiki/State_pattern)\n* [Strategy](Behavioral/Strategy) [:notebook:](http://en.wikipedia.org/wiki/Strategy_pattern)\n* [TemplateMethod](Behavioral/TemplateMethod) [:notebook:](http://en.wikipedia.org/wiki/Template_method_pattern)\n* [Visitor](Behavioral/Visitor) [:notebook:](http://en.wikipedia.org/wiki/Visitor_pattern)\n\n### [More](More)\n\n* [EAV](More/EAV) [:notebook:](https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model)\n* [Repository](More/Repository)\n* [ServiceLocator](More/ServiceLocator) [:notebook:](http://en.wikipedia.org/wiki/Service_locator_pattern)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikbert%2Fdesign-pattern-php8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikbert%2Fdesign-pattern-php8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikbert%2Fdesign-pattern-php8/lists"}