Welcome Guest, Not a member yet? Register   Sign In
Calling method of other class
#3

[eluser]bapobap[/eluser]
Hi Filippo,

When I do this it seems to create a new instance of the super-object as all the preparation work I've done in the first controller gets lost.

Basically everything gets routed to controllers/dispatcher.php. It takes all GET, POST, PUT, DELETE variables, cleans them etc and adds them into the CI object, $this->request_data. It then determines what controller and method to call, includes that file and calls it. Helpers that use $CI =& get_instance(); work fine with the $ClassName::$method() but as I stated PHP 5.2 you can't use a variable ClassName.

Using the above seems to create a fresh object that doesn't have any of my data in it. Is there anyway around that?

Thanks if you can help


Messages In This Thread
Calling method of other class - by El Forum - 06-19-2010, 06:14 PM
Calling method of other class - by El Forum - 06-20-2010, 12:57 AM
Calling method of other class - by El Forum - 06-20-2010, 03:07 AM
Calling method of other class - by El Forum - 06-20-2010, 03:15 AM
Calling method of other class - by El Forum - 06-20-2010, 03:19 AM
Calling method of other class - by El Forum - 06-20-2010, 03:24 AM
Calling method of other class - by El Forum - 06-20-2010, 03:38 AM
Calling method of other class - by El Forum - 06-20-2010, 03:49 AM
Calling method of other class - by El Forum - 06-20-2010, 03:56 AM
Calling method of other class - by El Forum - 06-20-2010, 03:58 AM
Calling method of other class - by El Forum - 06-20-2010, 04:32 AM
Calling method of other class - by El Forum - 06-20-2010, 04:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB