php-extended / php-factory-object
A library that implements the php-extended/php-factory-interface library
4.0.0
2022-05-30 05:58 UTC
Requires
- php: >=7.2
- php-extended/php-factory-interface: ^4
- php-extended/polyfill-php80-stringable: ^1
Requires (Dev)
README
A library that implements the php-extended/php-factory-interface library.
Installation
The installation of this library is made via composer.
Download composer.phar
from their website.
Then add to your composer.json :
"require": {
...
"php-extended/php-factory-object": "^3"
...
}
Then run php composer.phar update
to install this library.
The autoloading of all classes of this library is made through composer's autoloader.
Basic Usage
This library provide a single class, the AbstractFactory
which is
made to be implemented. Its create
method must return a single object each
time it is called, whether that object is constant or contains some form of
deterministic input or randomness is left to the implementation.
License
MIT (See license file).