Welcome Guest, Not a member yet? Register   Sign In
Difference in CI session
#8

[eluser]skunkbad[/eluser]
Aken is right.

CodeIgniter makes all loaded models and libraries available to the controller, which is why they are available using $this. $this refers to the controller instance, so when you are inside a controller, you are effectively accessing a property (sometimes called a member) that has been created for you by CI. You don't see it often in CI, but in many OOP implementations you will see "::". This is a scope resolution operator, and is usually used to call a static method, instead of "->", which is only used for accessing methods that are not static.


Messages In This Thread
Difference in CI session - by El Forum - 07-22-2012, 10:36 PM
Difference in CI session - by El Forum - 07-23-2012, 12:03 AM
Difference in CI session - by El Forum - 07-23-2012, 12:04 AM
Difference in CI session - by El Forum - 07-23-2012, 12:05 AM
Difference in CI session - by El Forum - 07-23-2012, 01:49 AM
Difference in CI session - by El Forum - 07-23-2012, 02:38 AM
Difference in CI session - by El Forum - 07-23-2012, 12:42 PM
Difference in CI session - by El Forum - 07-23-2012, 02:26 PM
Difference in CI session - by El Forum - 07-30-2012, 09:43 PM
Difference in CI session - by El Forum - 07-30-2012, 11:39 PM
Difference in CI session - by El Forum - 07-31-2012, 07:48 AM
Difference in CI session - by El Forum - 07-31-2012, 08:23 AM
Difference in CI session - by El Forum - 07-31-2012, 08:57 PM
Difference in CI session - by El Forum - 08-01-2012, 12:52 AM
Difference in CI session - by El Forum - 08-01-2012, 03:04 AM
Difference in CI session - by El Forum - 08-01-2012, 04:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB