Hi,
I have one config with some 100 variables. I want to access those variables inside class functions. I can only find two ways of doing this
class A
{
function B
{
global aa,ab;
}
function C
{
global aa,ab;
}
}
But this way I have to define the variables in each and every function.
Another way is to define class variables and initilize this variables with the values of global variables inside a constructor. But this way I have two define all the variables again inside the constructor
function A //constructor
{
global $aa;
$this->aa1=$aa;
}
Can someone suggest a better way to do this?