A PHP library contains code patterns ready to use.
This package contains few main code patterns you can use to build your own project. You are free to use anywhere in any way you want (MIT License).
The preferred method of installation is via Composer. Run the following
command to install the package and add it as a requirement to your project's
composer.json
:
composer require safronik/code-patterns
Patterns grouped by their destination:
Patterns which are create or store objects/values
- AbstractFabric.php
- Builder.php
- Container.php
- Fabric.php
- Multiton.php
- Prototype.php
- RAII.php
- Registry.php
- Singleton.php
Patterns which help to organize and build solid code structure
These helps you to organize the code in dynamic, its behaviour.
Patterns from any previous group with some additional changes like lazy loads or specific keys
Feel free to contribute!