承接 pointybeard/property-bag 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pointybeard/property-bag

Composer 安装命令:

composer require pointybeard/property-bag

包简介

Set of classes for managing key/value pairs.

README 文档

README

Latest Stable Version License

Simplifies the task of storing key/value pairs.

Installation

Property Bag is installed via Composer. To install, use composer require pointybeard/property-bag or add "pointybeard/property-bag": "~1.0" to your composer.json file.

Usage Example

Here is a quick and dirty example of how to use this group of classes


include "vendor/autoload.php";

use pointybeard\PropertyBag\Lib;

$p = new Lib\PropertyBag;

$p->fruit = "apple";
$p->animal = new Lib\Property("animal", "lion");
$p->clothing = new Lib\ImmutableProperty("clothing", "hat");

var_dump($p);

$p->fruit = "banana";
var_dump($p->fruit, $p->animal->value);

try{
    $p->clothing = "belt";
    var_dump($p->clothing);

} catch (Lib\Exceptions\AttemptToChangeImmutablePropertyException $ex) {
    print "Oh oh! You can't change Immutable property 'clothing'" . PHP_EOL;
}

print_r($p->toArray());

$p2 = new Lib\PropertyBag;
$p2->username = "barry";
$p2->password = "blahblah";

$p->credentials = $p2;

var_dump(
    $p->toArray(),
    $p->credentials->value->username,
    $p->credentials->value->username->value
);

Support

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

Contributing

We encourage you to contribute to this project. Please check out the Contributing documentation for guidelines about how to get involved.

License

"Property Bag" is released under the MIT License.

统计信息

  • 总下载量: 730
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固