類別IpFormatRule的繼承圖:

公開方法(Public Methods) | |
| IpFormatRule () | |
| validate ($value) | |
xxx.yyy.zzz.www
where each one of the elements is an integer between 0 and 255.
定義在 ipformatrule.class.php 檔案之第 18 行.
|
|
Initializes the rule 定義在 ipformatrule.class.php 檔案之第 23 行. 00024 { 00025 $this->RegExpRule(IP_FORMAT_RULE_REG_EXP, false); 00026 }
|
|
|
Retursn true if the given IP address is in valid CIDR format
依據RegExpRule重新實作. 定義在 ipformatrule.class.php 檔案之第 33 行. 00034 { 00035 if (!ereg($this->_regExp, $value, $regs)) 00036 { 00037 $this->_setError(ERROR_RULE_IP_FORMAT_WRONG); 00038 return false; 00039 } 00040 else if ($regs[1] > 255 || $regs[2] > 255 || $regs[3] > 255 || $regs[4] > 255) 00041 { 00042 $this->_setError(ERROR_RULE_IP_FORMAT_WRONG); 00043 return false; 00044 } 00045 else 00046 { 00047 $this->_setError(false); 00048 return true; 00049 } 00050 }
|