PHP头条
热点:

PHP-返射署理


PHP-返射代理
target[] = new $targetClass();
 	}
 	
 	function __call($name, $args) {
 		foreach ($this->target as $obj) { 
			$r = new ReflectionClass($obj); 
			if ($method = $r->getMethod($name)) { 
				if ($method->isPublic() && !$method->isAbstract()) { 
					return call_user_func_array(array(&$obj, $name), $args);
				}
			}
		} 
 	}
 }
 
 $stu = new ClassDelegator('Student');
 $stu->doWork('1111', 'rerew');
 
 
 
 
 
 
 
 

?

www.phpzy.comtrue/phprm/2467.htmlTechArticlePHP-返射署理 PHP-返射代理 target[] = new $targetClass(); } function __call($name, $args) { foreach ($this->target as $obj) { $r = new ReflectionClass($obj); if ($method = $r->getMethod($name)) { if ($method->isPublic() !$method->isA...

相关文章

相关频道:

PHP之友评论

今天推荐