Download the PHP package ebidtech/collection without Composer
On this page you can find all versions of the php package ebidtech/collection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ebidtech/collection
More information about ebidtech/collection
Files in ebidtech/collection
Package collection
Short Description A set of interfaces and traits to speed up the creation of collections
License MIT
Homepage http://github.com/ebidtech/collection
Informations about the package collection
Collection
A set of interfaces and traits to speed up the creation of collections.
Requirements
- PHP >= 5.4
Installation
The recommended way to install is through composer.
Just create a composer.json
file for your project:
Tip: browse ebidtech/collection
page to choose a stable version to use, avoid the @stable
meta constraint.
And run these two commands to install it:
Now you can add the autoloader, and you will have access to the library:
Usage
Collection class example:
From outside you can:
- iterate (due to IterableTrait)
- direct access using get() (due to DirectAccessTrait)
- use count() (due to CountableTrait)
Outside access example:
Notes:
- Traits use have an abstract getCollection() method that needs to be implemented on collection class, the GetCollectionTrait makes a simple implementation, you can override it if the property that holds the internal array is not named collection
Upgrading
Upgrade
Contributing
See CONTRIBUTING file.
Credits
- Ebidtech developer team, collection Lead developer Eduardo Oliveira ([email protected]).
- All contributors
License
Collection library is released under the MIT License. See the bundled LICENSE file for details.