fractal icon indicating copy to clipboard operation
fractal copied to clipboard

CursorInterface::getUrl?

Open matt-allan opened this issue 8 years ago • 3 comments

The paginator interface has getUrl but the cursor interface doesn't. I want to get the url for a specific cursor in my responses to show next/prev links, so I have to workaround the interface and do an instance of check right now.

matt-allan avatar Apr 17 '17 14:04 matt-allan

Would you mind showing the code you're currently using so I can get a feel for what you're doing? I'm leaning towards :+1: on it, but I want to make sure I understand.

greydnls avatar Apr 28 '17 02:04 greydnls

When we use collection with Pagination, the response contains pagination links for self/next/last, etc.

https://github.com/thephpleague/fractal/blob/9c9c493edcf0f5438555e5b515a790749a26c807/src/Serializer/JsonApiSerializer.php#L108-#L137

But CursorPaginator provides only metadata, not links.

https://github.com/thephpleague/fractal/blob/9c9c493edcf0f5438555e5b515a790749a26c807/src/Serializer/ArraySerializer.php#L129-#L139

Insolita avatar Oct 05 '20 00:10 Insolita

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 4 weeks if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 06:04 stale[bot]