The Slim Framework support forum has moved to This Tender forum is no longer maintained or monitored.

Doubt about custom error handlers and responses

acorrea's Avatar


02 Feb, 2016 09:50 AM


I've been reading this documentation page ( ), and I've seen that the example code uses the $response object referred by the container, and not the one passed as a function parameter.

* What's the reason behind it?
* What are the differences?
* Which is the recommended way to obtain the $response object?

Thank you for your time and wisdom.

P.D.: Another extra doubt, is it possible that the example code is completely wrong? It shows a call chain where the last call refers to the `write` method, but typically the `ResponseInterface` does not provide this method.

Thank you again.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac