function set($type, $setArray)
 {
     switch ($type) {
         case 'upload':
             $comPareArray = array('filepath', 'allowsize', 'allowtype', 'allowsuffix', 'randfix', 'prefix');
             if (Debug::compareArray($type, $setArray, $comPareArray)) {
                 foreach ($setArray as $key => $value) {
                     if ($key == 'allowtype') {
                         if (!is_array($value)) {
                             exit('请设置allowtype为数组!');
                         }
                     } elseif ($key == 'allowsuffix') {
                         if (!is_array($value)) {
                             exit('请设置allowsuffix为数组!');
                         }
                     }
                     self::${$key} = $value;
                     //设置成员属性
                 }
             }
             break;
         case 'water':
             $comPareArray = array('logopath', 'position', 'alpha', 'prefix');
             if (Debug::compareArray($type, $setArray, $comPareArray)) {
                 if (!file_exists($setArray['logopath'])) {
                     self::error(-8);
                 }
                 $setArray['prefix'] = !isset($setArray['prefix']) ? 'wa_' : $setArray['prefix'];
                 $setArray['position'] = !isset($setArray['position']) ? '9' : $setArray['position'];
                 $setArray['alpha'] = !isset($setArray['alpha']) ? 100 : $setArray['alpha'];
             }
             self::$water = $setArray;
             break;
         case 'zoom':
             $comPareArray = array('width', 'height', 'prefix');
             if (Debug::compareArray($type, $setArray, $comPareArray)) {
                 if (!isset($setArray['prefix'])) {
                     $setArray['prefix'] = 'zo_';
                 }
             }
             self::$zoom = $setArray;
             break;
     }
     return $this;
 }