Pagerfanta
Pagerfanta copied to clipboard
Add interface for paginated result, without ability to get next/prev page
Hi. Interface segregation says: dont depend on something you dont need. Why not to add an interface that can only get current page itmes, nbPages, nbItems but without getPageX stuff. I dont need to get next page when i'm in the view context isn't it? But now i can. Isn't it an ISP violation?
@pablodip thoughts?
why not to just add an interface, lets say "PaginatedResultInterface", that i can typehint my method's return type with it (in docblocks in php5 or eplicitly in upcoming php7). i think it'll solve the problem. or not? )
i can do it in a pr, should i?
Is the only problem pureness or is there anything you cannot do?
but why not to add it just for pureness, so people will be able to typehint their methods return types