Closed (fixed)
Project:
RESTful Web Services
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
25 Jul 2012 at 13:45 UTC
Updated:
4 Jan 2014 at 02:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sepgil commentedForgot to document the new feature in the readme.
Comment #3
klausiwhy is that part of the interface? I don't think it is needed in the interface as it is specific to querying?
same for limit()
please add a comment
that can be protected. And there should be a space before "=". And a docblock please.
docblock please
space before "="
you are retrieving the parameters again from the URL here. Is there no way to pass that down?
space before and after operators
operator spacing, also elsewhere.
we will have to take the "menu_path" option into account here
no need to use "&" for objects.
Comment #4
sepgil commentedNo it can't, since I'm calling the function from RestWSBaseFormat::generateQueryURI().
I thought, it might be usefull, if the functions handle that for them self, incase someone wants to just call one of those functions(query or generateQueryURI).
Corrected all other issues.
Comment #5
sepgil commentedComment #6
klausihierachy
let's rename this to offset
space before "="
limit logic is missing?
Let's rename this to generateQueryURIs() and return an array of all the available paging links. That can be processed by XML and JSON then.
you should also verify that the links look like it should look.
Comment #7
sepgil commentedI splitted the function into 2 functions, to have a cleaner code.
Corrected all other issues as well.
Comment #9
klausiactually that should be "hierarchy" :-)
very hard to read, please split that up into real if statements over several lines.
is that function really needed? Just create URLs in generateQueryURIs() and we can remove that.
relationship is one word.
Comment #10
sepgil commentedThis patch should work...
Comment #12
sepgil commentedAhh wrong patch
Comment #13
klausiNot good. These two methods are not part of the resource controller interface, so you cannot simply call them.
Looks like count() and limit() need to be part of the interface. At this point I think creating a new RestWSQueryResourceControllerInterface would make sense that contains query(), count() and limit() and derives from RestWSResourceControllerInterface.
And we should use type hinting on methods like generateQueryURIs() to make the new interface more clear.
Comment #14
sepgil commentedAdded the requested changed and also fixed the issues I missed yesterday.
Comment #15
klausiI don't think this interface makes sense on its own - it should inherit from the CRUD resource controller interface.
"should be counted"
do not pass all meta controls here, the client provided limit is enough
"next link was not generated on last page"
should use the same url() check as the tests above.
Comment #16
sepgil commentedFixed the issues, I think we can commit the patch now..
Comment #17
klausiCommitted, thank!