slimphp / Slim-Documentation

Old Slim Framework 3 documentation
16 stars 13 forks source link

Remove the container #5

Closed harikt closed 9 years ago

harikt commented 9 years ago

As we get the response object there is no need of the application container.

It seems to me that we can remove the code function ($c) { also.

harikt commented 9 years ago

If this PR is accepted I will open the PR for the rest with the same .

codeguy commented 9 years ago

The current code returns a new/fresh response object instead of assuming the injected response object is in a returnable form.

harikt commented 9 years ago

@codeguy I didn't get it . Was you referring the $response injected is new one ? I thought that is how the PSR-7 response works. the with methods always returns cloned ones.

akrabat commented 9 years ago

@harikt I think that as we're in an error situation, we can't assume that the Response object is in a valid state. Hence, the error handler creates a new Response object that it knows is valid and returns that.

harikt commented 9 years ago

@akrabat thanks for making it clear.