2017 © Pedro Peláez
 

library structure

Simple, immutable data structures

image

equip/structure

Simple, immutable data structures

  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

Equip Structure

Latest Stable Version License Build Status Code Coverage Scrutinizer Code Quality Total Downloads, (*1)

Provides a number of common data structures in Equip 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., (*2)

For more information, see the documentation., (*3)

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

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., (*5)

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., (*6)

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., (*7)

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., (*8)

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., (*9)

Requirements

The following versions of PHP are supported., (*10)

  • PHP 5.5
  • PHP 5.6
  • PHP 7.0
  • HHVM

Install

Via Composer, (*11)

$ composer require equip/structure

License

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

The Versions

12/02 2016

dev-master

9999999-dev

Simple, immutable data structures

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

list immutable dictionary set data structure hash map hash table ordered list unordered list

12/02 2016

1.1.0

1.1.0.0

Simple, immutable data structures

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

list immutable dictionary set data structure hash map hash table ordered list unordered list

08/02 2016

1.0.1

1.0.1.0

Simple, immutable data structures

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

list immutable dictionary set data structure hash map hash table ordered list unordered list

06/02 2016

1.0.0

1.0.0.0

Simple, immutable data structures

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

list immutable dictionary set data structure hash map hash table ordered list unordered list