Welcome Guest, Not a member yet? Register   Sign In
Writing Admin/User/Public controllers to insure authentication
#16

Including a constant is better than including the file path/name in each controller. However, if the loader/autoloader can find your class in the first place, you don't need to do either.

A great deal of code in CI's core is dedicated to loading classes, whether autoloading them or using $this->load->xxx(). From what I've seen, adding some more code to handle it in a manner which makes sense for your project, or including the use of Composer or some other autoload mechanism, is only going to have a negative impact on the project in the most extreme cases.
Reply


Messages In This Thread
RE: Writing Admin/User/Public controllers to insure authentication - by mwhitney - 01-05-2015, 01:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB