I have a public object Let say X. defined in a config file. How could I use this object in a method within a class. I think when I globalize X in that method its looks within the class. :(
include('config.php'); //the objec X is defined here
class MyClass{
public foo(){
global $X; // I thing It is looking within the class
}
}