necromant2005/tt-provider

List of traits for everyday usage

1.0.3 2013-07-22 15:28 UTC

README

Version 1.0.1 Created by Rostislav Mykhajliw

Introduction

TweeProvider is a list of traits for base usecases

Features / Goals

  • Simple set/get/constructor/property traits

Build Status

Installation

Main Setup

With composer
  1. Add this to your composer.json:
"require": {
    "necromant2005/": "1.*",
}
  1. Now tell composer to download TweeProvider by running the command:
$ php composer.phar update
Usage
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