Version 1.0.1 Created by Rostislav Mykhajliw
TweeProvider is a list of traits for base usecases
- Simple set/get/constructor/property traits
- Add this to your composer.json:
"require": {
"necromant2005/": "1.*",
}
- Now tell composer to download TweeProvider by running the command:
$ php composer.phar update
use TweeProvider\Data;
class Book
{
use Data\PropertyTrait, Data\ConstructTrait, Data\SetterGetterTrait;
}
$book = new Book(array(
'name' => 'Alice in Wonderland',
));
$book->author = 'Lewis Carroll';
echo $book->name; // Alice in Wonderland
echo $book->author; // Lewis Carroll