Welcome Guest, Not a member yet? Register   Sign In
using a variable to represent a class? Can anyone help
#4

[eluser]prestondocks[/eluser]
Thanks for your input. I have not tried this solution yet, but will put it in my tool box and sure it will come in handy at some point.

I listened to the Codeigniter podcast last night issue 3. They were talking about sub classing and I realised this was the best way to go. I will create a sub class that extends controller which will contain the variable and I will make all my controllers extend this sub class.

This will give all my controllers access to that variable and will open up a lot of other options for sharing common data within my application. Hoping it will allow me reduce my code in regards to security and theming.

Thanks


Messages In This Thread
using a variable to represent a class? Can anyone help - by El Forum - 08-15-2010, 03:01 PM
using a variable to represent a class? Can anyone help - by El Forum - 08-15-2010, 03:40 PM
using a variable to represent a class? Can anyone help - by El Forum - 08-16-2010, 12:09 AM
using a variable to represent a class? Can anyone help - by El Forum - 08-16-2010, 05:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB