2017 © Pedro Peláez
 

library utils-collection

Our standard class for handling lists in PHP.

image

cloudcreativity/utils-collection

Our standard class for handling lists in PHP.

  • Saturday, September 30, 2017
  • by lindyhopchris
  • Repository
  • 1 Watchers
  • 1 Stars
  • 172 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 2 % Grown

The README.md

Build Status, (*1)

cloudcreativity/utils-collection

Our standard collection class for handling lists in PHP. By lists, we mean numerically indexed arrays., (*2)

This package also contains our StandardIteratorInterface. We use this if we are writing specific collection classes that hold only particular types of objects., (*3)

License

Apache License (Version 2.0). Please see License File for more information., (*4)

Contributing

File an issue, or ideally submit a pull request. Bug fixes should be submitted against the master branch, new features/changes should be submitted against the develop branch. Pull requests should have updated or new unit tests in them., (*5)

Make sure your IDE has an EditorConfig plugin installed., (*6)

Testing

Clone the repository, then:, (*7)

bash composer up vendor/bin/phpunit, (*8)

Collection

The CloudCreativity\Utils\Collection\Collection is a standard class for handling numerically indexed lists. It comes with the following methods., (*9)

Modifiers

The following methods modify the list contained within the collection:, (*10)

  • add
  • addStrict
  • addObjects
  • clear
  • fill
  • fillObject
  • insertAt
  • pop
  • push
  • pushObjects
  • remove
  • removeAt
  • removeStrict
  • replace
  • shift
  • unshift
  • unshiftObjects

Accessors

The following methods give access to items within the collection:, (*11)

  • first
  • itemAt
  • last

Querying

The following methods can be used to assess or query the contents of the collection;, (*12)

  • any
  • contains
  • containsStrict
  • equals
  • equalsStrict
  • every
  • indexOf
  • indexOfStrict
  • isEmpty
  • isNotEmpty
  • search
  • searchStrict

Helpers

The following methods assist with handling the list, and return new instances of the collection. (I.e. the original collection is not modified.), (*13)

  • all
  • cast (static)
  • chunk
  • compact
  • copy
  • count
  • create (static)
  • diff
  • each
  • filter
  • implode
  • intersect
  • invoke
  • itemsAt
  • map
  • pad
  • reduce
  • reject
  • replicate
  • reverse
  • slice
  • sort
  • sync
  • take
  • tap
  • unique
  • uniqueStrict
  • without
  • withoutStrict

The Versions

30/09 2017

dev-develop

dev-develop https://github.com/cloudcreativity/utils-collection

Our standard class for handling lists in PHP.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.4

 

The Development Requires

by Cloud Creativity Ltd

cloudcreativity

30/09 2017

dev-master

9999999-dev https://github.com/cloudcreativity/utils-collection

Our standard class for handling lists in PHP.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.4

 

The Development Requires

by Cloud Creativity Ltd

cloudcreativity

30/09 2017

v1.0.0

1.0.0.0 https://github.com/cloudcreativity/utils-collection

Our standard class for handling lists in PHP.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.4

 

The Development Requires

by Cloud Creativity Ltd

cloudcreativity

25/06 2017

v0.3.0

0.3.0.0 https://github.com/cloudcreativity/utils-collection

Our standard class for handling lists in PHP.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.4

 

The Development Requires

by Cloud Creativity Ltd

cloudcreativity

17/06 2017

v0.2.0

0.2.0.0 https://github.com/cloudcreativity/utils-collection

Our standard class for handling lists in PHP.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.4

 

The Development Requires

by Cloud Creativity Ltd

cloudcreativity

30/09 2016

v0.1.1

0.1.1.0 https://github.com/cloudcreativity/utils-collection

Our standard class for handling lists in PHP.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.5.0

 

The Development Requires

by Cloud Creativity Ltd

cloudcreativity

23/04 2016

v0.1.0

0.1.0.0 https://github.com/cloudcreativity/utils-collection

Our standard class for handling lists in PHP.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.5.0

 

The Development Requires

by Cloud Creativity Ltd

cloudcreativity