I've learnt so much after subscribing to read your exclusive articles! 我學到訂閱閱讀獨家稿件後,這麼多!”
缺口

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秒