PHP 从映象(Reflection)类中读取属性信息
2007-04-01 23:53
267 查看
<?php
/**
从映象(Reflection)类中读取属性信息
用该方法可以查看指定类中的方法和属性
*/
include_once 'mycal.php';//一个类文件或采用系统中的类如Exception
$obj = new ReflectionClass('myCal');
//$obj = new ReflectionClass(Exception);
$arr = $obj->getMethods();//取得类中所有的名字
//$arr = $obj->getMethod('Calendar');//取得指定类的名字
//$arr = ReflectionClass::getMethod('myCal');
print_r($arr);
//Reflection::export(new ReflectionClass('ReflectionClass'));//通过此方法可以看到ReflectionClass中所有的属性和方法
?>
相关文章推荐
- php学习读取视频文件来获取视频属性的信息
- PHP列表一次性读取字段信息
- skyline中点击读取属性信息
- PHP通过读取DOM抓取信息
- java JDBC编程——从属性文件读取信息,并创建到数据库的连接
- windows文件属性信息读取与修改,文件属性标题作者修改
- PHP开发之读取照片EXIF中的经纬度位置信息
- php读取excel文件的数据信息
- 图像处理2_读取JPG图片的Exif属性(一) - Exif信息简介
- php读取数据库信息的几种方法
- php 读取目录所有文件信息dir()
- 遍历指定目录,并存储目录内所有文件属性信息的php代码
- 用PHP的XML扩展库读取CSDN博客的RSS列表信息
- php读取ini配置文件属性
- spring 中如何读取properties的中属性信息
- PHP如何读取照片的exif信息
- PHP源码:读取 ini 文件配置信息
- php简单实现基本库件的调用和配置信息的读取
- php读取数据库信息的几种方法
- php读取目录所有文件信息实现代码