{"id":20098952,"url":"https://github.com/jream/design-patterns","last_synced_at":"2025-05-06T06:30:43.770Z","repository":{"id":44369875,"uuid":"60459778","full_name":"JREAM/design-patterns","owner":"JREAM","description":"Simple examples of Design Patterns with PHP Examples","archived":false,"fork":false,"pushed_at":"2022-10-02T23:19:46.000Z","size":31,"stargazers_count":82,"open_issues_count":2,"forks_count":26,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-10-30T04:12:30.834Z","etag":null,"topics":["design-patterns","oop","oop-principles","php"],"latest_commit_sha":null,"homepage":"http://jream.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JREAM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-05T12:48:56.000Z","updated_at":"2024-09-15T13:38:20.000Z","dependencies_parsed_at":"2023-01-19T02:30:18.342Z","dependency_job_id":null,"html_url":"https://github.com/JREAM/design-patterns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JREAM%2Fdesign-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JREAM%2Fdesign-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JREAM%2Fdesign-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JREAM%2Fdesign-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JREAM","download_url":"https://codeload.github.com/JREAM/design-patterns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224490710,"owners_count":17319983,"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":["design-patterns","oop","oop-principles","php"],"created_at":"2024-11-13T17:07:18.599Z","updated_at":"2024-11-13T17:07:19.258Z","avatar_url":"https://github.com/JREAM.png","language":"PHP","readme":"# Design Patterns\n\nThese are design patterns in their simplest form.\nCurrently the **bold** items are ones I have examples for.\n\nMore will come later on.\n\n- abstract_factory - Creates families of related objects.\n- **adapter** - Lets classes work together that don't have compatible interfaces.\n- **builder** - Separate construction of complex objects.\n- command - Add parameters to clients with different requets, and undoable\n  operations.\n- composite - Composer objects in a tree structure and handle them individually.\n- decorator - Add more responsibility to objects dynamically.\n- **dependency_injection** - Easily share \"services\" across a platform. (DI, aka IoC/Inversion of Control)\n- facade - Makes subsystems easier to use.\n- **factory** - Creates a single subclass with that are similar.\n- front_controller - Most MVC's and web applications use this pattern.\n- iterator - Access elements of an aggregate object without knowing whats under\n  the hood.\n- **mediator** - Decouples Objects and Coordinates them together with a middle man (Events, Notifications)\n- **memento** - No encapsulation, allows you to change an objects internal state\n- **multi_inherit** - Extend a base class and act as if we can extend other classes for added functionality\n- **observer** - (aka Publish/Subscribe) One to Many Dependency to notify that\n  an object has changed.\n- **prototype** - Create new object by cloning from a skeleton of an object.\n- proxy - Placeholder for another object to acccess it.\n- **singleton** - Only allow one instance for an objects lifespan.\n- state - Alter an object when it changes state.\n- template method - Subclasses can redfine certain steps of without messing up\n  the main structure.\n- visitor - New operations defined without change classes or elements it\n  operates on.\n\n## About the Patterns\nThis is made to understand patterns as simple as possible. So here are a few things to know:\n\n- Notes are provided in the class.\n- I will **not** be using namespaces to keep it simple.\n- At the bottom of the class contain examples.\n- The name of the pattern is the name of the class.\n- Classes **not** requiring Abstract Classes and Interfaces are **not included** to keep it simple.\n- **You would generally do this:**\n  - In most cases, change the name of the class(es).\n  - Put your classes in separate files.\n\n  --\n\n  (c) 2016 Jesse Boyer | MIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjream%2Fdesign-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjream%2Fdesign-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjream%2Fdesign-patterns/lists"}