Welcome Guest, Not a member yet? Register   Sign In
__get in libraries
#2

As test, make a print_r(get_instance()) and you will get the complete CI instance to access. So it depends on your codedesign and what you will do.

The first example i thik is from class with special needs. __get() is invoked when the method or property you want to use is inaccessible.

If you develop a library you should go with the second way but hey .. thats CI you can choose the way you like.

Reply


Messages In This Thread
__get in libraries - by kylevorster - 12-11-2014, 02:21 AM
RE: __get in libraries - by Rufnex - 12-11-2014, 09:28 AM
RE: __get in libraries - by mwhitney - 12-15-2014, 10:11 AM
RE: __get in libraries - by Narf - 12-16-2014, 12:22 PM
RE: __get in libraries - by Hobbes - 12-20-2014, 05:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB