rwillians/stingray
最新稳定版本:2.1.0
Composer 安装命令:
composer require rwillians/stingray
包简介
Dot notation reader/writer for multidimensional arrays in PHP.
README 文档
README
Dot notation reader/writer for multidimensional arrays in PHP.
Installing via Composer
Add Stingray to your project:
$> composer.phar require rwillians/stingray ^2.0
or directly to composer.json:
{
"require": {
"rwillians/stingray": "^2.0"
}
}
Then update your dependencies:
$> composer.phar update
Example Usage
To get any node from an array:
use Rwillians\Stingray\Stingray; $someArray = array( 'client' => array( 'name' = 'John Doe' ) ); // Getting a value using dot notation: echo Stingray::get($someArray, 'client.name'); // Outputs: 'John Doe' // Changing a value using dot notation: Stingray::set($someArray, 'client.name', 'Jane Doe'); // Create a new key-value to an existent array using dot notation: Stingray::set($someArray, 'client.address', 'Some Street, 123');
统计信息
- 总下载量: 14.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-12