All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning and this changelog format.
- Added
invoke
method to standard iterator trait.
- Use
clone
rather thannew
in standard iterator trait'sreject
andfilter
methods. This allows an implementing class to have different constructor arguments.
- New collection methods
diff
,fill
,fillObject
,implode
andintersect
. - New standard iterator methods
take
,tap
andsort
. - Collection can now be json encoded (implements
JsonSerializable
). - Collection can now be casted to a string.
- The collection
sync
method is deprecated.
- Collection now has a static
create
method, for fluent construction. - Can now pass a callback to collection
first
andlast
methods. - New collection methods
take
andtap
. - Standard iterator now has a static
create
method, for fluent construction. - Standard iterator now has a static
cast
method, to cast a value to an instance of the class. - Standard iterator interface now has the following methods:
copy
for fluent cloning.map
for mapping the iterator to a generic collection.each
for fluent iterating.
- Collection constructor now uses variable-length arguments.
- Collection casting now longer accepts objects unless they are traversable.
- Collection now implements
IteratorAggregate
rather thanIterator
. - Collection object modifiers (e.g.
addObjects
) are now always strict. - Collection
replace
anditemsAt
methods now use variable-length arguments. - Collection
chunk
method now returns a collection of collection chunks. - Collection methods with strict parameters have been split into two functions:
add
andaddStrict
unique
anduniqueStrict
remove
andremoveStrict
without
andwithoutStrict
search
andsearchStrict
contains
andcontainsStrict
equals
andequalsStrict
indexOf
andindexOfStrict
- Standard iterator is now longer abstract and now accepts values to its constructor.
- Standard iterator
first
andlast
methods now returnnull
if the collection is empty. - Standard iterator functions now accept a
callable
instead of aClosure
.
- Remove the deprecated
Collection::toArray
method.
- The following collection methods are deprecated in preference of methods with variable-length arguments...
addMany
: useadd
oraddStrict
addObject
: useaddObjects
pushMany
: usepush
pushObject
: usepushObjects
removeMany
: useremove
orremoveStrict
unshiftMany
: useunshift
unshiftObject
: useunshiftObjects
- The collection
find
method is deprecated in favour offirst
.
- Standard iterator can now be cast to a collection using the
collect
method. isNotEmpty
method added to collection and standard iterator.- Collection
all
method to get the collection as an array.
- Abstract standard iterator is now immutable by default.
- Standard iterator method
getAll
is nowall
. - Methods on the standard iterator interface are now type hinted to receive a
Closure
rather than acallable
.
- Invalid variable name in
Collection::invoke
.
Collection::toArray
is deprecated in favour ofCollection::all
AbstractStandardIterator
did not implementStandardIteratorInterface
Initial development release.
Collection
classStandardIteratorInterface
, plus a trait and abstract class for easily implementing the interface.