PHP反射的一些特性

    public function getByObjectId($id) {
        $id = (int) $id;
        if ($id) {
            $SQL = "select * from {$this->__DTN} where id=$id";
            $refl = new ReflectionClass(get_class($this));
            return $refl->newInstance();
        } else {
            return false;
        }
    }
 
手册中:

Classes/Object 函数

Table of Contents

 

 
 
posted @ 2010-11-23 21:25  brainmix  阅读(383)  评论(0)    收藏  举报