I had no idea at all about PHP or programming until I started reading your website! "私はあなたのウェブサイトを読み始めるまで私は、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が 、[ 文字列 $フォーム名 = NULL]、[ 文字列 $デフォルト = NULL])
AddFormIdentifier ( string $fieldName , string $formName ) ボイド AddFormIdentifier文字列 $ 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の場合文字列 $名
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( 文字列 $名文字列 $型文字列 $ IsRequiredが 、[ 文字列 $フォーム名 = 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. 文字列 $フォーム名 :これは、フィールドが属するフォームの名前です。 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を文字列 $フォーム名
  • $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 文字列 $フォーム名 :これは、フォームに割り当てることがフォームの名前です。
(line 188 ) AddItemOneGreaterThanTwoComparison(ライン188)

いずれかの項目つの比較を超えている項目を追加します。 そうでない場合、フォームフィールドの項目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未満であることを、このチェックは、メッセージが表示されます。

  • 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 文字列 $名 :これは返すようにフォームフィールドの名前です。
(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 () 検証 が無効になる ()

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

セキュリティイメージ

ドミニクスキナーによって書か
最終更新日:2011年10月25日午後04時00分38秒を