ReflectionClass::getConstructor
获取类的构造函数
&reftitle.description;
public ReflectionMethodnullReflectionClass::getConstructor
获取已反射的类的构造函数。
&reftitle.parameters;
&no.function.parameters;
&reftitle.returnvalues;
一个 ReflectionMethod 对象,反射了类的构造函数,或者当类不存在构造函数时返回 &null;。
&reftitle.examples;
ReflectionClass::getConstructor 的基本用法
getConstructor();
var_dump($constructor);
?>
]]>
&example.outputs;
string(11) "__construct"
["class"]=>
string(15) "ReflectionClass"
}
]]>
&reftitle.seealso;
ReflectionClass::getName