Welcome Guest, Not a member yet? Register   Sign In
Developing Codeigniter Libraries with proper Codeigniter / OOP fundamentals
#4

[eluser]wiredesignz[/eluser]
If your libraries are co-dependent then you should use require or require_once prior to the class definition and then instantiate the required object(s) inside your class.

CI itself relies on get_instance() in many libraries to reference the core (controller) and while this works within the CI structure, it does not follow good practice, usually a reference to the core would be passed into the library as required.


Messages In This Thread
Developing Codeigniter Libraries with proper Codeigniter / OOP fundamentals - by El Forum - 07-06-2008, 08:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB