Skip to content

frozensheep/synthesize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synthesize

Synthesizer trait to auto generate getter and setter access for objects.

Latest Stable Version Build Status Coverage Status MIT License PHP 5.4 PHP 5.5 PHP 5.6 PHP 7

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';

About

Synthesizer trait to auto generate getter and setter access for objects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages