![]() |
Accessing property from image library class within a view - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Accessing property from image library class within a view (/showthread.php?tid=5190) |
Accessing property from image library class within a view - El Forum - 01-10-2008 [eluser]section31[/eluser] I'm trying to access a property from the image library class within a view and for some reason it's cleared. Why doesn't it have the same value as it did in the controller? When you load a view from a controller doesn't it add the attach the super object to $this so you can use whatever you were using in the controller in the view? Can someone clarify this for me, I would like to know what exactly do I have access to from the view? Accessing property from image library class within a view - El Forum - 01-10-2008 [eluser]xwero[/eluser] what are you trying to get? Accessing property from image library class within a view - El Forum - 01-10-2008 [eluser]section31[/eluser] Code: $this->image_lib->error_msg In the controller the array is populated, and in the view, it's an empty array() Accessing property from image library class within a view - El Forum - 01-10-2008 [eluser]xwero[/eluser] it not sure it is for public consumption but you can catch it in your controller and add it to the view file data agrument. i had it happen with the validation error string, it's not good debugging but it works ![]() Accessing property from image library class within a view - El Forum - 01-10-2008 [eluser]section31[/eluser] true, that does work but i was wondering if someone could explain to me why this doesn't work in technical terms. |