Your PHP skills tool showed me were I needed to improve and how to do it! 您的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字符串字符串 $ itemTwo, 字符串 $ itemOne消息
AddField ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) 无效 激活addField字符串 $名称字符串 $类型字符串 $ isRequired,[ 字符串 $ formName = NULL],[ 字符串 $默认 = NULL)
AddFormIdentifier ( string $fieldName , string $formName ) 的的无效 AddFormIdentifier字符串 $ fieldName的 字符串 $ formName)
AddItemOneGreaterThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddItemOneGreaterThanTwoComparison字符串字符串 $ itemTwo, 字符串 $ itemOne消息
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddItemOneLessThanTwoComparison字符串字符串 $ itemTwo, 字符串 $ itemOne消息
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddNotEqualToComparison字符串字符串 $ itemTwo, 字符串 $ itemOne消息
GetCurrentForm () 无效 GetCurrentForm ()
GetErrors () 无效 GetErrors ()
GetField ( string $name ) RocksFormField GetField字符串 $名
SetFormType ( string $type ) 无效 SetFormType字符串 $类型
Validate () 无效 验证 ()
方法
(line 29 ) 构造_建设 (第29行)
  • public 访问:公众
__construct () RocksForm _结构 ()
(line 162 ) AddEqualToComparison(162线)

增加了一个比较平等。 这支票,表单字段的值是相等的,如果他们不那么显示该消息。

  • public 访问:公众
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddEqualToComparison( 字符串字符串 $ itemTwo, 字符串 $ itemOne消息
  • $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( 字符串 $ fieldName的 字符串 $ 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( 字符串字符串 $ itemTwo, 字符串 $ itemOne消息
  • $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( 字符串字符串 $ itemTwo, 字符串 $ itemOne消息
  • $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( 字符串字符串 $ itemTwo, 字符串 $ itemOne消息
  • $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行)

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

  • 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 凯蒂 ,2011年12月3日(星期六)上午01:26
下跌下床情绪低落。 这brightneed我的天!

安全形象

书面由多米尼克·斯金纳
最后更新:2011年10月25日十六点00分38秒