Helper and abstract classes |
[eluser]Unknown[/eluser]
I'm pretty new to codeigniter and I'm in the process of converting a old project into CodeIgniter so it can be easily expanded and built upon. I have an abstract class which defines a load of constants. I then have an array which builds itself calling from the abstract class (though not the classes only use, nor the only data in the array). I then have the helper which uses the array in its function. Now the issue. I currently have the class, array and functions all in the helper, however when i call the array inside the functions, its not available (obviously i've used global $array). I've tried several ways, such as loading the class as a library, the array in a config etc to no avail. What would be the best way to approach this? Thanks in advance
[eluser]Otemu[/eluser]
Hi, The best way probably to do this would be to extend the class check out CodeIgniter Base Classes: Keeping it DRY |
Welcome Guest, Not a member yet? Register Sign In |