]> source.dussan.org Git - nextcloud-server.git/commit
AppFramework StreamResponse
authorBernhard Posselt <dev@bernhard-posselt.com>
Thu, 22 Jan 2015 19:26:46 +0000 (20:26 +0100)
committerBernhard Posselt <dev@bernhard-posselt.com>
Fri, 27 Feb 2015 14:42:33 +0000 (15:42 +0100)
commit95239ad21e113d7d25d5844b0ac5f15a606f2140
tree384279227d5255640f3dec2c2e86b65e025b7df5
parent06141ed95a87e40dded4db6bedc4b643cdfdda0e
AppFramework StreamResponse

First stab at the StreamResponse, see #12988

The idea is to use an interface ICallbackResponse (I'm not 100% happy with the name yet, suggestions?) that allow the response to output things in its own way, for instance stream the file using readfile

Unittests are atm lacking, plan is to

check if a mock of ICallbackResponse will be used by calling its callback (also unhappy with this name) method
Usage is:

$response = new StreamResponse('path/to/file');

rename io to output, add additional methods and handle error and not modified cases when using StreamResponse

fix indention and uppercasing, also handle forbidden cases

fix indention

fix indention

no forbidden, figuring out if a file is really readable is too complicated to get to work across OSes and streams

remove useless import

remove useless import

fix intendation
lib/private/appframework/app.php
lib/private/appframework/dependencyinjection/dicontainer.php
lib/private/appframework/http/dispatcher.php
lib/private/appframework/http/output.php [new file with mode: 0644]
lib/public/appframework/http/icallbackresponse.php [new file with mode: 0644]
lib/public/appframework/http/ioutput.php [new file with mode: 0644]
lib/public/appframework/http/streamresponse.php [new file with mode: 0644]
tests/lib/appframework/AppTest.php
tests/lib/appframework/http/StreamResponseTest.php [new file with mode: 0644]