foo::internal(); would work except for the fact that I really need $this because internal() normally use $this->properties...
I've oversimplified my example. Sorry.
This would be more accurate :
Quote:
class foo{
public $msg;
public function interne(){
print $msg;
}
public function __call($method, $args){
if(isset($this->$method)){
$func = $this->$method;
$func();
}
}
}
$f = new foo();
$f->msg = 'hello';
$f->bar = function () {foo::interne();};
$f->bar();
|
foo::interne(); won't 'know' that $f->msg has been set...
I also tryed call_user_func_array(array($f, 'bar'), array()); instead of $f->bar without success
Thanks for you help... specially at this hour.