Welcome Guest, Not a member yet? Register   Sign In
extend MY_Controller
#1

[eluser]Zawardo[/eluser]
I created a MY_Controller class, putted into core folder and it's working fine.
Now i want to extend another time the controller, let's say MY_Second_controller.
If i put this class into core folder and declare it as class MY_Second_controller. extends MY_Controller {.....
when i try to use it with an application controller (like controller.php declared as class controller extends MY_Second_controller {...) i get an error of MY_Second_controller not found.
I have inserted into config-php a piece of code to autoload class from core folder and it's working.

My question is: why i had to add this autoload function? everything prefixed with MY_ should be autoloaded by default or do i have misunderstood anything?


Messages In This Thread
extend MY_Controller - by El Forum - 05-21-2011, 02:28 AM
extend MY_Controller - by El Forum - 05-21-2011, 02:50 AM
extend MY_Controller - by El Forum - 05-21-2011, 03:36 AM
extend MY_Controller - by El Forum - 05-21-2011, 03:47 AM
extend MY_Controller - by El Forum - 05-21-2011, 03:49 AM
extend MY_Controller - by El Forum - 05-21-2011, 04:01 AM
extend MY_Controller - by El Forum - 05-21-2011, 04:27 AM
extend MY_Controller - by El Forum - 05-21-2011, 05:21 AM
extend MY_Controller - by El Forum - 05-21-2011, 11:33 AM
extend MY_Controller - by El Forum - 05-21-2011, 12:53 PM
extend MY_Controller - by El Forum - 05-21-2011, 01:50 PM
extend MY_Controller - by El Forum - 05-21-2011, 04:17 PM
extend MY_Controller - by El Forum - 05-22-2011, 06:13 AM
extend MY_Controller - by El Forum - 06-10-2011, 03:55 PM
extend MY_Controller - by El Forum - 06-11-2011, 01:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB