All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning and this changelog format.
- Added
invokemethod to standard iterator trait.
- Use
clonerather thannewin standard iterator trait'srejectandfiltermethods. This allows an implementing class to have different constructor arguments.
- New collection methods
diff,fill,fillObject,implodeandintersect. - New standard iterator methods
take,tapandsort. - Collection can now be json encoded (implements
JsonSerializable). - Collection can now be casted to a string.
- The collection
syncmethod is deprecated.
- Collection now has a static
createmethod, for fluent construction. - Can now pass a callback to collection
firstandlastmethods. - New collection methods
takeandtap. - Standard iterator now has a static
createmethod, for fluent construction. - Standard iterator now has a static
castmethod, to cast a value to an instance of the class. - Standard iterator interface now has the following methods:
copyfor fluent cloning.mapfor mapping the iterator to a generic collection.eachfor fluent iterating.
- Collection constructor now uses variable-length arguments.
- Collection casting now longer accepts objects unless they are traversable.
- Collection now implements
IteratorAggregaterather thanIterator. - Collection object modifiers (e.g.
addObjects) are now always strict. - Collection
replaceanditemsAtmethods now use variable-length arguments. - Collection
chunkmethod now returns a collection of collection chunks. - Collection methods with strict parameters have been split into two functions:
addandaddStrictuniqueanduniqueStrictremoveandremoveStrictwithoutandwithoutStrictsearchandsearchStrictcontainsandcontainsStrictequalsandequalsStrictindexOfandindexOfStrict
- Standard iterator is now longer abstract and now accepts values to its constructor.
- Standard iterator
firstandlastmethods now returnnullif the collection is empty. - Standard iterator functions now accept a
callableinstead of aClosure.
- Remove the deprecated
Collection::toArraymethod.
- The following collection methods are deprecated in preference of methods with variable-length arguments...
addMany: useaddoraddStrictaddObject: useaddObjectspushMany: usepushpushObject: usepushObjectsremoveMany: useremoveorremoveStrictunshiftMany: useunshiftunshiftObject: useunshiftObjects
- The collection
findmethod is deprecated in favour offirst.
- Standard iterator can now be cast to a collection using the
collectmethod. isNotEmptymethod added to collection and standard iterator.- Collection
allmethod to get the collection as an array.
- Abstract standard iterator is now immutable by default.
- Standard iterator method
getAllis nowall. - Methods on the standard iterator interface are now type hinted to receive a
Closurerather than acallable.
- Invalid variable name in
Collection::invoke.
Collection::toArrayis deprecated in favour ofCollection::all
AbstractStandardIteratordid not implementStandardIteratorInterface
Initial development release.
CollectionclassStandardIteratorInterface, plus a trait and abstract class for easily implementing the interface.