1. //__get()方法用来获取私有属性.
    private function __get($property_name) {
            if (isset($this -> property_name)) {
                    return($this -> $property_name);
            } else {
                    return(NULL);
            }
    }

    //__set()方法设置私有属性
    private function __set($property_name,$value) {
            $this -> $property_name = $value;
    }
    //__isset()方法可以设为私有
    private function __isset($nm) {
            echo "当在类外部使用isset()函数测定私有成员$nm时,自动调用<br />";
            return isset($this -> $nm);
    }