I have a PHP class method which is using a static function from with a another class. How do i enable that static function to modify variables within the calling class.. Example as follows:
PARENT:
class sys_core
{
public $test = 'no';
// --------------------
public function __construct()
{
}
// --------------------
public function init()
{
sys_loader::load_config('123');
print $this->test;
}
// --------------------
// --------------------
// --------------------
// --------------------
// --------------------
} // END Class
STATIC CLASS
class sys_loader
{
private $registry = array();
// --------------------
public static function load_config($file)
{
$this->test = 'yes';
}
// --------------------
// --------------------
// --------------------
// --------------------
} // END Class
ERROR:
Fatal error: Using $this when not in object context