Is there a way to pass every variable in a controller action, to the view automatical |
Is this what you want to do:
http://php.net/manual/en/function.get-defined-vars.php This function returns a multidimensional array containing a list of all defined variables, be them environment, server or user-defined variables, within the scope that get_defined_vars() is called. Then you can pass that to the view (or, I dunno, make it a global variable and access it that way) I don't recommend any of this, setting up a $data variable doesn't seem like a burden worth working around... |
Messages In This Thread |
Is there a way to pass every variable in a controller action, to the view automatical - by desbest - 06-16-2017, 11:47 AM
RE: Is there a way to pass every variable in a controller action, to the view automatical - by reactionstudio - 06-16-2017, 03:50 PM
RE: Is there a way to pass every variable in a controller action, to the view automatical - by InsiteFX - 06-17-2017, 03:35 AM
RE: Is there a way to pass every variable in a controller action, to the view automatical - by dave friend - 06-17-2017, 06:23 PM
RE: Is there a way to pass every variable in a controller action, to the view automatical - by Kaosweaver - 06-19-2017, 06:12 AM
|