NewsNewsFeaturesDownloadsDevelopmentSupportForumDocumentsAbout Us

IntRule 類別 參考文件
[Validator_Rules]

類別IntRule的繼承圖:

RegExpRule Rule Validation Object 全部成員列表

公開方法(Public Methods)

 IntRule ()
 validate ($value)

詳細描述

Checks if the given value is an integer, not only in type but also in format. It will return ERROR_RULE_INT_FORMAT_WRONG if the format is not correct

定義在 intrule.class.php 檔案之第 14 行.


建構子與解構子說明文件

IntRule::IntRule  ) 
 

Initialize the rule

定義在 intrule.class.php 檔案之第 19 行.

參考 RegExpRule::RegExpRule().

00020         {
00021             $this->RegExpRule(INT_RULE_REG_EXP, false);
00022         }


函式成員說明文件

IntRule::validate value  ) 
 

Returns true if the given value is an integer, or false otherwise. In case of error it will also set the error code to ERROR_RULE_INT_FORMAT_WRONG

依據RegExpRule重新實作.

定義在 intrule.class.php 檔案之第 28 行.

參考 Validation::_setError().

00029         {
00030             if (parent::validate($value))
00031             {
00032                 $this->_setError(false);
00033                 return true;
00034             }
00035             else
00036             {
00037                 $this->_setError(ERROR_RULE_INT_FORMAT_WRONG);
00038                 return false;
00039             }
00040         }


此類別(class) 文件是由下列檔案中產生: