frozensheep / synthesize
Synthesizer trait to auto generate getter and setter access for objects.
Installs: 107 962
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- php: >=5.4
- myclabs/php-enum: 1.*
This package is not auto-updated.
Last update: 2024-11-09 19:17:27 UTC
README
Synthesizer trait to auto generate getter and setter access for objects.
Install
To install with Composer:
composer require frozensheep/synthesize
Usage
use Frozensheep\Synthesize\Synthesizer; class Transaction { use Synthesizer; protected $arrSynthesize = array( 'amount' => array('type' => 'float'), 'description' => array('type' => 'string', 'default' => 'Super cool product.') }; } $objTransaction = new Transaction(); $objTransaction->amount = 19.95; $objTransaction->description = '4x Large Bowls';