• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Global Abstract Class

#1
I've tried a few things, but nothing seems to do the trick, where is the best place to put a global abstract class eg:

abstract class GlobalTypes
{
    const Type1 = 'str_type_1';
    const Type2 = 'str_type_2';
    const XYZ'str_type_xyz';

    conts YES = true;
}

So GlobalTypes::YES needs to be available in the entire project.
Reply

#2
If you need the global and they do not change which constants do not change.

Just add the Constants to the ./app/Config/Constants.php file.

Or it may also work by putting it in the ./app/Common.php
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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