extphp/data-dot
Composer 安装命令:
composer require extphp/data-dot
包简介
A property accessor helper capable of using dot notation for a mix of arrays and objects.
关键字:
README 文档
README
A simple dot notation accessor, able to handle a mix of arrays and objects.
Usage
<?php use ExtPHP\DataDot\Dot; $data = [ 'eyes' => 'blue', 'age' => '27', 'parents' => [ 'mother' => 'Jane', 'father' => 'Jack' ] ]; $dot = new Dot($data); $dot->get('parents.father', 'John'); // returns 'Jack' $dot->get('sister', 'Kate'); // returns 'Kate'
Testing
php vendor/bin/phpunit
统计信息
- 总下载量: 1.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-12