-
Notifications
You must be signed in to change notification settings - Fork 3
Add new methods to interface #3
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
base: master
Are you sure you want to change the base?
Conversation
src/EventStore.php
Outdated
* @param int $limit | ||
* @return \Iterator | ||
*/ | ||
public function loadStreamEvents(string $streamName, int $skip, int $limit): \Iterator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skip should default to 0
and limit to null
src/EventStore.php
Outdated
/** | ||
* @param string $streamName | ||
* @param int $skip | ||
* @param int $limit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int | null $limit
src/EventStore.php
Outdated
* @param int $limit | ||
* @return \Iterator | ||
*/ | ||
public function loadStreamEventsReverse(string $streamName, int $skip, int $limit): \Iterator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skip should default to 0 and limit to null
src/EventStore.php
Outdated
/** | ||
* @param string $streamName | ||
* @param int $skip | ||
* @param int $limit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int | null $limit
pagination should be optional. By default the returned cursor should iterate over all events in the stream. See my inline comments for details |
Adding the methods
loadStreamEvents
andloadStreamEventsReverse
to theEventStore
interface.I did this as part of Hacktoberfest, so I would appreciate it if You would label the Issue accordingly 😃
Closes #2