This has got to be one of the most frequently updated PHP sites, keep up the good work... 这一定是更新最频繁的PHP网站之一,保持了良好的工作... ...“
最大

RocksForm类

说明

实现接口:

  • RocksIValidatable

这代表在页面上的一种形式。

这简化了常见的问题与表单处理和验证。

  • Dominic Skinner 作者:玫瑰斯金纳
  • 0.2.1 版本:0.2.1

)位于/ RocksForm.php(第15行)

方法摘要
__construct () RocksForm __construct ()
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddEqualToComparison字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息
AddField ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) 无效 AddField字符串 $名称字符串 $类型字符串 $ isRequired, 字符串 $ formName = NULL],[ 字符串 $默认 = NULL])
AddFormIdentifier ( string $fieldName , string $formName ) 无效 AddFormIdentifier字符串 字段名字符串 $ formName)
AddItemOneGreaterThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddItemOneGreaterThanTwoComparison字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddItemOneLessThanTwoComparison字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddNotEqualToComparison字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息
GetCurrentForm () 无效 GetCurrentForm ()
GetErrors () 无效 GetErrors ()
GetField ( string $name ) RocksFormField GetField字符串 $名称
SetFormType ( string $type )字符串 $类型 无效 SetFormType
Validate () 无效 验证 ()
方法
(line 29 ) 构造__construct(29行)
  • public 访问:公共
__construct () RocksForm __construct()
(line 162 ) AddEqualToComparison(162线)

添加一个比较平等的。 这检查表单字段的值是相等的,如果他们不那么的消息显示。

  • public 访问:公共
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddEqualToComparison( 字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息
  • $itemOne : this is the name of the first field to compare 字符串 $ itemOne:这是第一个字段的名称进行比较
  • $itemTwo : this is the name of the second field to compare 字符串 $ itemTwo:这是第二个字段的名称来比较
  • $message : this is message that is displayed if the fields are not equal 字符串 $消息 :这是显示的信息是,如果字段不等于
(line 134 ) AddField(134行)

这种方法增加了另一个领域的形式。 你需要添加一个字段的形式返回关联数组中的价值,以及执行它valudation。

  • public 访问:公共
AddField ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) 无效 AddField( 字符串 $名称字符串 $类型字符串 $ isRequired, 字符串 $ formName = NULL],[ 字符串 $默认 = NULL])
  • $name : this is the name of the form field 字符串 名称 :这是表单域的名称
  • $type : this is the type of the form field 字符串 $类型 :这是表单字段的类型
  • $isRequired : this indicates if the field is a required field 字符串 $ isRequired:这表明如果该字段是必填字段
  • $formName : this is the form name that field is part of. 字符串 $ formName:这是表单的名称,字段的一部分。 这是不需要的,如果只有一个形式
  • $default : this is the default value of the field if it is left empty. 字符串 $默认 :这是字段的默认值,如果它为空
(line 81 ) AddFormIdentifier(81线)

这增加了一个独特的形式标识符,这表明一个表单域只属于页面上的一种形式。 注意:如果有不止一个页面上的形式,你只需要使用此方法。

  • public 访问:公共
AddFormIdentifier ( string $fieldName , string $formName ) 无效 AddFormIdentifier( 字符串 字段名字符串 $ formName)
  • $fieldName : this is the field name that uniquely identifies the form 字符串 $ fieldName的 :这是字段的名称,唯一标识的形式
  • $formName : this is the form name that you want to assign to the form 字符串 $ formName:这是你想要的形式分配给窗体的名称
(line 188 ) AddItemOneGreaterThanTwoComparison(188行)

添加一个项目一个是比两个项目比较大。 这支票,表单域的项目之一值是大于项目两个,如果他们不那么消息显示。

  • public 访问:公共
AddItemOneGreaterThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddItemOneGreaterThanTwoComparison( 字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息
  • $itemOne : this is the name of the first field to compare 字符串 $ itemOne:这是第一个字段的名称进行比较
  • $itemTwo : this is the name of the second field to compare 字符串 $ itemTwo:这是第二个字段的名称来比较
  • $message : this is message that is displayed if the validation fails 字符串 $消息 :这是如果验证失败,显示的信息
(line 201 ) AddItemOneLessThanTwoComparison(201行)

增加一个项目一个是比两个项目比较少。 这支票,表单域的项目之一值是小于项目两个,如果他们不那么消息显示。

  • public 访问:公共
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddItemOneLessThanTwoComparison( 字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息
  • $itemOne : this is the name of the first field to compare 字符串 $ itemOne:这是第一个字段的名称进行比较
  • $itemTwo : this is the name of the second field to compare 字符串 $ itemTwo:这是第二个字段的名称来比较
  • $message : this is message that is displayed if the validation fails 字符串 $消息 :这是如果验证失败,显示的信息
(line 175 ) AddNotEqualToComparison(175行)

添加不等于一个比较。 这将检查表单字段的值不相等,如果他们不那么消息显示。

  • public 访问:公共
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddNotEqualToComparison( 字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息
  • $itemOne : this is the name of the first field to compare 字符串 $ itemOne:这是第一个字段的名称进行比较
  • $itemTwo : this is the name of the second field to compare 字符串 $ itemTwo:这是第二个字段的名称来比较
  • $message : this is message that is displayed if the fields are equal 字符串 $消息 :这是信息显示领域的平等
(line 43 ) GetAssociativeArrayData(43行)

这将返回一个关联数组作为键和值的字段值的字段的名称。

  • public 访问:公共
GetAssociativeArrayData () 无效 GetAssociativeArrayData()
(line 106 ) GetCurrentForm(106行)

这将返回刚刚调回的形式。

  • public 访问:公共
GetCurrentForm () 无效 GetCurrentForm()
(line 209 ) GetErrors(209行)

这将返回一个错误消息的数组。 这也可以确保如果这就是所谓的形式已经得到验证。

  • public 访问:公共
GetErrors () 无效 GetErrors()
(line 145 ) GetField(145行)

基于它的名字,该方法返回一个领域

  • public 访问:公共
GetField ( string $name ) RocksFormField GetField( 字符串 $名称
  • $name : this is the name of the form field to return 字符串 名称 :这是返回的表单域的名称
(line 66 ) SetFormType(66行)

这集的形式类型

  • public 访问:公共
SetFormType ( string $type )字符串 $类型 无效 SetFormType)
  • $type : this sets the type of form RocksPost or RocksGet 字符串 $类型 :这台形式RocksPost或RocksGet
(line 222 ) 验证 (222行)

这将检查所有的表单域通过所有的验证测试。

  • public 访问:公共
Validate () void 验证 ()

最新的评论:1。 第1页共1页。 平均评分:
1:26am on Saturday, December 3rd, 2011 徐子淇 1:26星期六上午,12月3日,2011
下跌下床情绪低落。 这brightneed我的天

安全形象

作者由Dominic斯金纳
最后更新:2011年10月25日16点00分38秒