Synthesizer trait to auto generate getter and setter access for objects.
To install with Composer:
composer require frozensheep/synthesize
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';