Welcome Guest, Not a member yet? Register   Sign In
Leveraging "load->_ci_cached_vars" array in libraries
#1

[eluser]neal789[/eluser]
Just wondering if anyone sees any downside to leveraging the _ci_cached_vars method of the CI_Loader class as a substitute for passing variables from my controllers into library functions?

It seems like I could clean up my code a lot and not need to worry about passing in session information to libraries if I just access the load->_ci_cached_vars array within my libraries to get user information. Can I depend on that array being correct? Is there any downside or risk?

Thanks for any input.


Messages In This Thread
Leveraging "load->_ci_cached_vars" array in libraries - by El Forum - 09-17-2010, 12:44 PM
Leveraging "load->_ci_cached_vars" array in libraries - by El Forum - 09-17-2010, 01:09 PM
Leveraging "load->_ci_cached_vars" array in libraries - by El Forum - 09-17-2010, 02:11 PM
Leveraging "load->_ci_cached_vars" array in libraries - by El Forum - 09-17-2010, 02:53 PM
Leveraging "load->_ci_cached_vars" array in libraries - by El Forum - 09-17-2010, 03:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB