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文字列 $ nameは文字列 $タイプ文字列 $ IsRequiredは 、[ 文字列 $ formnameを = NULL]、[ 文字列 $デフォルト = NULL])
AddFormIdentifier ( string $fieldName , string $formName ) ボイド AddFormIdentifier文字列 $ fieldNameに文字列 $ 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 ) コンストラクタ__コンストラクト (29行目)
  • public アクセス:公共
__construct () RocksForm __コンストラクト ()
(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:これは、比較する2番目のフィールドの名前です
  • $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( 文字列 $ nameは文字列 $タイプ文字列 $ IsRequiredは 、[ 文字列 $ formnameを = NULL]、[ 文字列 $デフォルト = NULL])
  • $name : this is the name of the form field $ nameを 文字列 :これは、フォームフィールドの名前です。
  • $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を :これはフィールドの一部であることをフォーム名です。 1つのフォームのみが存在する場合、これは必要ありません
  • $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)

項目1項目2比較です。より大きいが追加されます。 彼らはそのメッセージが表示されていない場合、フォームフィールドの項目1の値は項目2より大きいことを確認するためです。

  • 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:これは、比較する2番目のフィールドの名前です
  • $message : this is message that is displayed if the validation fails 文字列 $メッセージ :これは、検証が失敗した場合に表示されるメッセージです。
(line 201 ) AddItemOneLessThanTwoComparison(ライン201)

項目1項目2比較です。未満で追加されています。 彼らはそのメッセージが表示されていない場合、フォームフィールドのアイテムのいずれかの値がアイテム2未満であることを確認するためです。

  • 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:これは、比較する2番目のフィールドの名前です
  • $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:これは、比較する2番目のフィールドの名前です
  • $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 $ nameを 文字 、これは返されるフォームフィールドの名前です。
(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 () validate()無効

日付へのコメント:1。 1ページ中1ページ。 平均評価:
1:26am on Saturday, December 3rd, 2011 キャシー 1:26 2011年12月3日(土曜日)の午前
落ち込んでベッドから落ちた。 これは私の日brightneedています!

セキュリティイメージ

ドミニクスキナーによって書かれた
最終更新日:2011年10月25日午前16時○○分38秒を