Welcome Guest, Not a member yet? Register   Sign In
Tip: Sick of get_instance()?
#14

[eluser]louis w[/eluser]
If you want to use this under PHP4 or worried about performance from multiple calls to it (I agree with Dam1an that this would only happen if you used it ALOT) you can do it like below. This really doesn't do anything above the normal get_instance besides make your code look prettier and save you from having to check if it exists all the time.

Code:
$CI = CI();


Messages In This Thread
Tip: Sick of get_instance()? - by El Forum - 04-08-2009, 08:23 AM
Tip: Sick of get_instance()? - by El Forum - 04-08-2009, 08:43 AM
Tip: Sick of get_instance()? - by El Forum - 04-08-2009, 08:55 AM
Tip: Sick of get_instance()? - by El Forum - 04-08-2009, 09:14 AM
Tip: Sick of get_instance()? - by El Forum - 04-08-2009, 09:32 AM
Tip: Sick of get_instance()? - by El Forum - 04-08-2009, 09:54 AM
Tip: Sick of get_instance()? - by El Forum - 04-16-2009, 07:56 AM
Tip: Sick of get_instance()? - by El Forum - 04-16-2009, 08:42 AM
Tip: Sick of get_instance()? - by El Forum - 04-16-2009, 08:47 AM
Tip: Sick of get_instance()? - by El Forum - 04-17-2009, 04:53 AM
Tip: Sick of get_instance()? - by El Forum - 04-17-2009, 07:56 PM
Tip: Sick of get_instance()? - by El Forum - 04-17-2009, 11:33 PM
Tip: Sick of get_instance()? - by El Forum - 04-19-2009, 07:04 AM
Tip: Sick of get_instance()? - by El Forum - 04-20-2009, 03:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB