Hi,
I would like to make a class in PHP such as it would be searchable with PHP native method array_search
. Currently my class implements IteratorAggregate
and Countable
, which allows me to do foreach
on it.
There is a couple of other SPL interfaces (SeekableIterator, ArrayAccess, etc...) which seems to maybe fit, but I would like to know if someone has already done this and which interface is suitable for what I want to do.
Thank you