Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB