伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-06/1181852708.html
function _set($property_name, $value)
{
$this->properties[$property_name] = $value;
}
function _call($function_name, $args)
{
print("Invoking $function_name() n");
print("Arguments: ");
print_r($args);
return(TRUE);
}
}
$o = new Overloader();
//invoke _set() 给一个不存在的属性变量赋值,激活_set()
$o->dynaProp = "Dynamic Content";
//invoke _get() 激活_get()
print($o->dynaProp . "n");
//invoke _call() 激活_call()
$o->dynaMethod("Leon", "Zeev");
?>
PHP 5.0对象模型探索之重载
'http://www.etoow.com/html/2007-06/1181852708.html