-
- Downloads
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
Showing
- lib/private/appframework/app.php 29 additions, 11 deletionslib/private/appframework/app.php
- lib/private/appframework/dependencyinjection/dicontainer.php 5 additions, 0 deletionslib/private/appframework/dependencyinjection/dicontainer.php
- lib/private/appframework/http/dispatcher.php 4 additions, 6 deletionslib/private/appframework/http/dispatcher.php
- lib/private/appframework/http/output.php 70 additions, 0 deletionslib/private/appframework/http/output.php
- lib/public/appframework/http/icallbackresponse.php 28 additions, 0 deletionslib/public/appframework/http/icallbackresponse.php
- lib/public/appframework/http/ioutput.php 57 additions, 0 deletionslib/public/appframework/http/ioutput.php
- lib/public/appframework/http/streamresponse.php 48 additions, 0 deletionslib/public/appframework/http/streamresponse.php
- tests/lib/appframework/AppTest.php 29 additions, 13 deletionstests/lib/appframework/AppTest.php
- tests/lib/appframework/http/StreamResponseTest.php 99 additions, 0 deletionstests/lib/appframework/http/StreamResponseTest.php
Loading
Please register or sign in to comment