thoma127/dict
Composer 安装命令:
composer require thoma127/dict
包简介
A simple PHP class for Python dictionary-like functionality.
README 文档
README
This is a simple PHP class to mimic some of the behavior of a Python dictionary.
Namely, easily storing and retrieving arbitrary data by key reference.
Usage
$data = ["foo" => "bar"];
$dict = new \UMN\CEHD\Dict\Dict($data);
$foo = $dict->get("foo"); // will be "bar"
$baz = $dict->get("baz"); // will be null
$json = $dict->toJSON(); // will be {"foo":"bar"} (string)
$array = $dict->toArray();
var_dump($array);
array(1) {
'foo' =>
string(3) "bar"
}
统计信息
- 总下载量: 62
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2017-02-07