necromant2005/tt-provider

日常使用特性列表

1.0.3 2013-07-22 15:28 UTC

This package is auto-updated.

Last update: 2024-08-29 04:32:09 UTC


README

版本 1.0.1 由 Rostislav Mykhajliw 创建

简介

TweeProvider 是一组用于基础用例的特性

特性 / 目标

  • 简单的 set/get/constructor/property 特性

Build Status

安装

主要设置

使用 composer

  1. 将此添加到您的 composer.json 中
"require": {
    "necromant2005/": "1.*",
}
  1. 现在,运行以下命令让 composer 下载 TweeProvider
$ 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