We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! I'm looking for a way to reindex a collection using my own callable function. It might be something like that:
interface ReadableCollection extends Countable, IteratorAggregate { /* ... other methods */ public function reindex(?Closure $p = null): ReadableCollection; /* ... other methods */ } class ArrayCollection implements Collection, Selectable, Stringable { /* ... other methods */ public function reindex(?Closure $p = null): ReadableCollection { return $this->createFrom(array_combine(array_map($p, $array), $array)); } /* ... other methods */ }
Is it possible somehow or might be implemented? Thanks for any help!
The text was updated successfully, but these errors were encountered:
I don't see much value in adding that functionality to the library. Creating a new collection with a different index can be done in userland.
Sorry, something went wrong.
No branches or pull requests
Hello! I'm looking for a way to reindex a collection using my own callable function. It might be something like that:
Is it possible somehow or might be implemented? Thanks for any help!
The text was updated successfully, but these errors were encountered: