承接 minormous/structure 相关项目开发

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

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

minormous/structure

最新稳定版本:1.0.0

Composer 安装命令:

composer require minormous/structure

包简介

Simple, immutable data structures

README 文档

README

Latest Stable Version License Build Status Code Coverage Scrutinizer Code Quality Total Downloads

Provides a number of common data structures in Minormous that are not natively supported by PHP. Each structure is represented by an immutable object that can be counted and serialized to JSON. All of the structures can be used as iterators and arrays, but cannot be modified using array functions.

For more information, see the documentation.

This package is compliant with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.

Structures

Dictionary is an implementation of a associative array that stores values identified by a key. Only associative arrays can be used to initialize the structure. Any value can be defined by a string key.

SortedDictionary is an implementation of a associative array that also sorts the array. When the dictionary is modified it will be sorted. By default the asort function is used.

OrderedList is an implementation of a list that stores ordered values. Only an indexed array can be used to initialize the structure. Any value can be added. When the list is modified it will be sorted. By default the sort function will be used.

UnorderedList is an implementation of a list that stores unordered values. The same value may appear more than once. Only an indexed array can be used to initialize the structure. Any value can be added.

Set is an implementation of a set that stores a unique values. The same value will not appear more than once. Only an indexed array can be used to initialize the structure. Adding an existing value to the set will have no effect. A set also also be added to before or after an existing element.

Requirements

The following versions of PHP are supported.

  • PHP 5.5
  • PHP 5.6
  • PHP 7.0
  • HHVM

Install

Via Composer

$ composer require minormous/structure

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-12