Welcome Guest, Not a member yet? Register   Sign In
DrF Reverse Routing
#21

[eluser]wiredesignz[/eluser]
If the Router class is already loaded then load_class('Router') will work perfectly well. And references are not required for objects in PHP5 either.
#22

[eluser]Johan André[/eluser]
[quote author="WanWizard" date="1283397430"]Note that load_class() behaviour is changed in CI 2.0, so when you upgrade this is no longer going to work.

For 2.0, use
Code:
$Router =& load_class('Router', 'core');
[/quote]

I've been using Reverse Routing with CI 2.0 for quite some time now and have not seen any problem...
#23

[eluser]WanWizard[/eluser]
See @wiredesignz remark: if the class is already loaded, the function doesn't bother doing anything, it just returns the already instantiated class.

My note was just for completeness, there is always a danger in using 'undocumented features', they might change in future releases, and can cause lots of headaches. Better be aware of the change now, even if in this particular case it doesn't really matter.
#24

[eluser]mattalexx[/eluser]
I've developed another Reverse Routing solution based on this one.

http://ellislab.com/forums/viewthread/167693/




Theme © iAndrew 2016 - Forum software by © MyBB