• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.