I'm working on a framework that has a function invokeView() in the controller. As of now, this basically calls include on a $target php class which in turn displays a smarty template. I'd like the $target class to have access to a $response object which is created inside of the controller (the same place that calls the $target page).
Instead of having the $target page grab the $response object from a global area (like session storage), I'd like to pass it in to the $target class, maybe by having a function on the $target object like display($response). It seems like if I did something like that, the call stack would just keep growing and growing, which would not be good.
Ben hiçbir mantıklı ne diyorum mu? Eğer öyleyse, ne $ yanıtı geçen veya Oturumu'nda onu kapma, daha mantıklı?
Teşekkürler!