Matt
Matt
So I guess as a workaround, I'll have to check if megasync is running already and if it is, then don't execute it again. Since concurrency isn't supported, maybe megasync...
The response class has no knowledge of the request method. So you would pass in the superglobal that's available within the resource through the request to the response.
Yes you are correct. It wouldn't make sense to pass $_POST in but most definitely it would make sense to pass in $_GET.
Of course you would only pass in $_GET for @method get methods as well.
I think $_GET should really just live in a resource though. You shouldn't have to set $_GET just to do unit tests on your end for Response since $_GET isn't...
The other thing about this is strictly speaking how does the Response class even know if $_GET exists? It potentially could be called outside of a Resource context albeit it...
Seems other people agree with me that it should be limited in scope where it's used: http://stackoverflow.com/questions/132342/testing-form-inputs-in-phpunit
I like the idea of passing the request object into the response. If $_GET parameters were attached to the request, then it would be trivial to manipulate your response using...
I'm not entirely sure what you're on the fence about. It makes sense to make the request object available to the response so you manipulate the response based on what...
I don't think your suggestion to use an IoC helps. You're simply setting a public property in that case on the response which I would not advise due to the...