Download the PHP package axelitus/design-patterns without Composer
On this page you can find all versions of the php package axelitus/design-patterns. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download axelitus/design-patterns
More information about axelitus/design-patterns
Files in axelitus/design-patterns
Package design-patterns
Short Description Design Patterns for PHP
License MIT
Homepage http://axelitus.mx/projects/axelitus/design-patterns
Informations about the package design-patterns
Design Patterns for PHP
A framework agnostic PHP package that contains base classes to easily extend and implement some design patterns.
Package Information
- Package: Patterns
- Version: 0.3.1
- Namespace: axelitus\DesignPatterns
- Author: Axel Pardemann ([email protected])
- Roadmap: axelitus/design-patterns at Interstate
- Repository: axelitus/php-design-patterns at GitHub
- Build Status (master):
- Build Status (develop):
- Composer Package: axelitus/design-patterns at Packagist
- Issue Tracker: GitHub's issue tracker
Requirements
The requirements for this package to work are the following:
- PHP >= 5.4.*
Standards
This package is intended to follow some standards for easy contributions and usage. Recently there has been an initiative to standardize the interoperation of frameworks, though I think this easily extends to most pieces of code everyone is building. The group behind all this is the PHP-FIG (Framework Interoperability Group), you should pay them a visit at their site.
There are already some standards marked as accepted (final): PSR-0, PSR-1, PSR-2 and PSR-3.
This package is intentend to be PSR-2 compliant.
Being PSR-2 compliant means this package can be easily installed by using guide for coding styles and the developers and contributors should enforce this for everyone's benefit.
Contents
All classes are referenced to the package namespace if not otherwise stated.
-
Utils - Has some useful utilities encapsulated.
- Creational\Factory - Defines a Factory object.
- Creational\Multiton - Defines a Multiton object.
- Creational\MultitonShelf - Defines a MultitonShelf object.
- Creational\Singleton - Defines a Singleton object.
- Creational\SingletonShelf - Defines a SingletonShelf object.
- Creational\TMultiton - Defines a generic Multiton object.
-
Creational\TSingleton - Defines a generic Singleton object.
- Interfaces\Forgeable - Defines the interface for an object that is forgeable.
- Interfaces\Initializable - Defines the interface for an object that is initializable.
How to install
To install this package and use it in your app just follow these instructions (if you haven't read the documentation from Composer please do so before you continue):
-
Download composer if you haven't already done so (use your preferred method). Example:
-
Place a
require
statement inside yourcomposer.json
file replacing<version>
with the desired version. Example: -
Run the composer installer to resolve dependencies and download the packages. Example:
-
In order to use the packages you have to load the autoloader that was generated by composer. Example:
- Finally just use the package classes as needed: