Skip to content

Additional functionality for supporting classes. #8

New issue

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

Merged
merged 4 commits into from
Jan 20, 2023
Merged

Conversation

b00gizm
Copy link
Contributor

@b00gizm b00gizm commented Jan 20, 2023

No description provided.

Some linters (like PHPStan) are complaining about the `For` attribute
since it's a reserved keyword. This commit renames the attribute to
`ForType` to avoid this issue.
New functionality:
- Collection now implements `ArrayAccess` interface.
- New method `add` to add new elements to the collection.
- Basic FP methods `map`, `filter`, and `reduce`.
This allows to use this paginator as a regular array.
This is useful if you want to support multiple repositories, for example
for database and cache. In its default implementation, it will delegate
collection operations to the first repository in the chain.
@b00gizm b00gizm added the enhancement New feature or request label Jan 20, 2023
@b00gizm b00gizm self-assigned this Jan 20, 2023
@b00gizm b00gizm merged commit 663a8f8 into main Jan 20, 2023
@b00gizm b00gizm deleted the feat/support branch January 20, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant