Welcome Guest, Not a member yet? Register   Sign In
Community Auth: Limitation for classes
#1
Question 

Hi friends!
I started to learn CodeIgniter few days ago, and first library that I plugged in was Community Auth.

The way in which this library serves Authentication functions is a little bit confusing me. I expect something like that: if I once plug-in third library, their functions and methods will be available everywhere at the application (means in each Controller). Instead of this, how I learned, Authentication functions will be available to use only when extending from MY_Controller (from Community Auth).
But what will be if I need to use another third-library with another ancestor class? For example in C++ it is possible to use Multiple inheritance (which is however not good style of coding), but this is not possible in PHP.

Therefore I have question:
Whether I necessarily need to extend my controller from MY_Controller to use (for example) "is_logged_in" function ?

Sorry, if I missed something important in guideness, please correct me.
Thanks in advance.
Reply


Messages In This Thread
Community Auth: Limitation for classes - by Yuribtr - 11-13-2017, 12:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB