After taking your course, my knowledge of PHP has ballooned! "あなたのコースを受講した後、PHPの私の知識が膨れました!"
ロブ

RocksFormFieldクラス

説明

インタフェースを実装します。

  • RocksIValidatable

このクラスは、フォームフィールドを表す検証と値の処理を処理します。 これはusualy内部的に使用されます。

  • string $name: the name of the field プロパティ:文字列$ name:フィールドの名前
  • string $type: the type of the field プロパティ:文字列が$ type:フィールドの種類
  • bool $isRequired: if the field is required プロパティの型bool $ IsRequiredは:フィールドが必要な場合は、
  • mixed $value: the value of the form field プロパティ:ミックス$値:フォームフィールドの値
  • bool $isSet: indicates if the form field is set. プロパティの型bool $かどうかの判断:フォームフィールドが設定されているかどうかを示します。 これは欲張っ内部的に使用されます。
  • string $formName: the form name of the form field. プロパティ:文字列$ FORMNAME:フォームフィールドのフォーム名。 これは欲張っ内部的に使用されます。
  • Dominic Skinner 著者:ドミニクスキナー
  • 0.2.1 バージョン:0.2.1

) / RocksFormField.php(19行)に配置

メソッドの概要
__construct ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) RocksFormField __construct文字列 $ nameは文字列 $タイプ文字列 $ IsRequiredは 、[ 文字列 $ formnameを = NULL]、[ 文字列 $デフォルト = NULL])
AddRegex ( ボイド AddRegex , $ regexに ) $メッセージ
Validate () 無効 検証 ()
__get ( ボイド __get ) $名
__set ( ボイド __set , $ varは ) $ varValue)
__toString () ボイド __toString ()
メソッド
(line 37 ) コンストラクタ__コンストラクト (37行)

これは、フォームフィールドオブジェクトを作成します。

  • public アクセス:公共
__construct ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) RocksFormField _構造文字列 $ nameは文字列 $タイプ文字列 $ 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を :これはフィールドの一部であることをフォーム名です。 1つのフォームのみが存在する場合、これは必要ありません
  • $default : this is the default value of the field if it is left empty. 文字列 $デフォルト :それは空のままにされている場合は、このフィールドのデフォルト値です。
(line 97 ) AddRegex(ライン97)
  • public アクセス:公共
AddRegex ( ボイド AddRegex( , $ regexに ) $メッセージ
  • $正規表現
  • $メッセージ
(line 71 ) 検証 (ライン71)

すべてのフォームフィールドは、すべてのフィールドレベルの検証テストに合格することを確認するためです。

  • public アクセス:公共
Validate () validate()無効

の実装:
RocksIValidatable ::検証()
(line 112 ) __get(ライン112)
  • public アクセス:公共
__get ( ボイド __取得 ) $名
  • $ nameに
(line 122 ) __set(ライン122)
  • public アクセス:公共
__set ( ボイド _セット , $ varは ) $ varValue)
  • $ varの
  • $ varValue
(line 131 ) __toString(ライン131)
  • public アクセス:公共
__toString () ボイド の__toString()

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

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