承接 xethron/extended-array 相关项目开发

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

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

xethron/extended-array

Composer 安装命令:

composer require xethron/extended-array

包简介

Extended Array gives PHP arrays new life

README 文档

README

Install

Edit your composer.json file to require xethron/extended-array and run composer update

"require": {
    "xethron/extended-array": "dev-master"
}

Usage

// Create a blank extended array
$array = new Xethron\ExtendedArray;

// Create a new extended array from an existing array
$array = new Xethron\ExtendedArray($array);

// Accessing Data
$value = $array['key'];
$value = $array->key;
$value = $array->get('key', 'Default Value');

// Setting Data
$array['key'] = 'value';
$array->key = 'value';
$array->set('key', 'value');

// Checking if a key exists
$bool = isset($array['key']);
$bool = isset($array->key);
$bool = $array->has('key');

// Unset a value
unset($array['key']);
unset($array->key);
$array->forget('key');

// Get the actual array
$value = $array->getArray();

// Check if the array contains a list of keys
$bool = $array->hasAll(['key1', 'key2', 'key3']);

// Check if the array contains one of the following keys
$bool = $array->hasOne(['key1', 'key2', 'key3']);

// Add a key only if it doesn't exist
$array->add('key', 'value');

// Split an array into two arrays. One with keys and the other with values.
list($keys, $values) = $array->split();

Contributors

Bernhard Breytenbach (@BBreyten)

This library is based on ideas and code from the Laravel Framework.

License

Extended Array is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-06-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固