随笔 - 78  文章 - 25  trackbacks - 0
<2009年6月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿

随笔分类(75)

随笔档案(78)

相册

实用Links

我的Links

搜索

  •  

积分与排名

  • 积分 - 112051
  • 排名 - 519

最新评论

阅读排行榜

评论排行榜

反射类ReflectionClass,其中包含的方法可以通过下面的方法获取:示例如下。

<?php
    $class=new ReflectionClass("ReflectionClass");
    $methods=$class->getMethods();
    foreach($methods as $method)
        echo $method->getName()."<br>"; 
?>

运行结果如下:
__clone
export
__construct
__toString
getName
isInternal
isUserDefined
isInstantiable
getFileName
getStartLine
getEndLine
getDocComment
getConstructor
hasMethod
getMethod
getMethods
hasProperty
getProperty
getProperties
hasConstant
getConstants
getConstant
getInterfaces
getInterfaceNames
isInterface
isAbstract
isFinal
getModifiers
isInstance
newInstance
newInstanceArgs
getParentClass
isSubclassOf
getStaticProperties
getStaticPropertyValue
setStaticPropertyValue
getDefaultProperties
isIterateable
implementsInterface
getExtension
getExtensionName


posted on 2009-06-28 15:00 期待明天 阅读(612) 评论(0)  编辑  收藏 所属分类: PHP

只有注册用户登录后才能发表评论。


网站导航: