Welcome Guest, Not a member yet? Register   Sign In
Extending an extended core class
#1

[eluser]JCianflone[/eluser]
Hello,

I'm having this strange issue with CI 2.0. I'm working on this app that will have an Admin and a Front End. They are both unique but do share some common variables and do some common things. What I wanted to do was this:

Code:
class MY_Controller extends Controller {} //extend the controller for generic shared vars and functions

class MY_Front_Controller extends MY_Controller {}

class MY Admin_Controller extends MY_Controller {}

I then want to use them in this manor:

Code:
class Welcome extends MY_Front_Controller {}

(NOTE: I omitted constructor functions for easier reading)

I know I was able to do this in 1.7.2 with no issues, but now I'm getting an error saying that welcome.php can't find MY_Front_Controller

I think the issue is where I'm placing the files, there is no code in the files yet, so there isn't anything I could have done wrong!

I put ALL 3 functions in the core folder, but that doesn't seem to work. I did try moving the Front and Admin Controllers to the libraries folder too, but that didn't work either.

Any ideas?


Messages In This Thread
Extending an extended core class - by El Forum - 09-12-2010, 08:16 AM
Extending an extended core class - by El Forum - 09-12-2010, 09:15 AM
Extending an extended core class - by El Forum - 09-12-2010, 01:34 PM
Extending an extended core class - by El Forum - 09-12-2010, 01:57 PM
Extending an extended core class - by El Forum - 09-13-2010, 01:07 PM
Extending an extended core class - by El Forum - 09-14-2010, 01:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB