edelprino / buildertrait
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.
dev-master
2016-10-14 12:01 UTC
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2022-12-28 11:44:22 UTC
README
If you want to create a builder but you don't want to duplicate or write with...
methods.
BuilderTrait\With
create automatically with...
method based on property of the builder object.
Example
class AnObjectBuilder { use With; private $foo; public function buildAnObject() { return new AnObject($this->foo); } } $builder = new AnObjectBuilder(); $anObject = $builder->withFoo('bar')->buildAnObject();
##TODO
-
With
trait for addwith...
methods based on builder properties -
Build
trait for createbuild
method based on getter/setter of object to create
Install
composer require edelprino/buildertrait