セキュアな仮想生活!
This has got to be one of the most frequently updated PHP sites, keep up the good work... "この仕事の良い更新頻度が最も得をする1つの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 デフォルトはnull =には、[ 文字列を $ formName [ 文字列を $ = nullの ]、[
AddFormIdentifier ( string $fieldName , string $formName ) 無効 AddFormIdentifierを $ formName( 文字列 $ fieldNameが文字列
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は文字列 $ name)
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:これは比較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 デフォルトはnull =には、[ 文字列を $ formName [ 文字列を $ = 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行)

これは、フォームのフィールドは、1つのページ上のフォームに属していることを示しますユニークな形の識別子を追加します。 あなたはそこだけしている場合、このメソッドを使用する必要が注意してくださいページに1つ以上の形式です。

  • public アクセス:公共の
AddFormIdentifier ( string $fieldName , string $formName ) formName、 文字列 $ 無効 AddFormIdentifier( 文字列 $ fieldNameが
  • $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つの比較を超えています。 そのフォームフィールドの値のいずれかの項目これは、チェックがより大きい項目の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)
  • $name : this is the name of the form field to return 文字列 $名 :これ返すフォームの名前のフィールド
(line 66 ) SetFormType(66行)

これは、フォームを入力します

  • public アクセス:公共の
SetFormType ( string $type ) void SetFormType( 文字列 $)
  • $type : this sets the type of form RocksPost or RocksGet 文字列 $タイプ :これはRocksGetタイプの設定フォームRocksPostまたは
(line 222 ) 検証 (222行)

これは、チェックがすべてのフォームフィールドはすべての検証テストに合格。

  • public アクセス:公共の
Validate ()検証を 無効

コメントはありませんが提供されている。
セキュリティイメージ

スキナードミニク書かれて
最終更新日:2009年9月23日午前6時18分22秒