On 03/14/2013 07:51 AM, Qingping Hou wrote:
On Thu, Mar 14, 2013 at 7:05 AM, Bernhard Posselt <[email protected]> wrote:
Regarding PUT: PHP does not support it officially and the solutions are a
bit hacky so I chose to not implement them.
The global variables are passed to the Request class:


I would like to take this junior job :)

My question is should NotFoundResponse and ForbiddenResponse return null or
user defined contents on render call? If users can also control render output,
then I am not sure which base class should I choose for them. Because user
might want to render template or json or just plaintext.
_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud

I'd just extend Response and add the headers in the constructor like https://github.com/owncloud/apps/blob/master/appframework/http/redirectresponse.php#L42 which is also a pure header response. There are too many options too extend this like you said (template/json/even download) so people should just inherit from that class if they need it like: NotFoundTemplateResponse extends NotFoundResponse.

I dont think people need these responses though since the server/ownCloud should serve a standard template anyway on 404 or 403.

PS: dont forget the tests ;) should only be one test for each response.
_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud

Reply via email to