<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 03/14/2013 07:51 AM, Qingping Hou
wrote:<br>
</div>
<blockquote
cite="mid:CAF5F7KHQbVJYaYRJa7g-VUiCwgHojW4hTbVCN54NM7OM0oOXiA@mail.gmail.com"
type="cite">
<pre wrap="">On Thu, Mar 14, 2013 at 7:05 AM, Bernhard Posselt <a class="moz-txt-link-rfc2396E" href="mailto:nukeawhale@gmail.com"><nukeawhale@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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
<a class="moz-txt-link-abbreviated" href="mailto:Owncloud@kde.org">Owncloud@kde.org</a>
<a class="moz-txt-link-freetext" href="https://mail.kde.org/mailman/listinfo/owncloud">https://mail.kde.org/mailman/listinfo/owncloud</a>
</pre>
</blockquote>
</blockquote>
<br>
I'd just extend Response and add the headers in the constructor like
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="https://github.com/owncloud/apps/blob/master/appframework/http/redirectresponse.php#L42">https://github.com/owncloud/apps/blob/master/appframework/http/redirectresponse.php#L42</a>
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. <br>
<br>
I dont think people need these responses though since the
server/ownCloud should serve a standard template anyway on 404 or
403.<br>
<br>
PS: dont forget the tests ;) should only be one test for each
response.<br>
</body>
</html>