وهذا يخلق الكائن حقل النموذج
__construct ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) RocksFormField __ التصور ($ اسم سلسلة، سلسلة $ نوع، سلسلة $ isRequired، [السلسلة $ formName = فارغة]، [سلسلة $ الافتراضي = فارغة])
- $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. سلسلة $ الافتراضية: هذه هي القيمة الافتراضية للحقل إذا ما تركت فارغة.
AddRegex ( باطل AddRegex ( , $ رجإكس، ) $ رسالة)
هذه الشيكات أن كل حقل النموذج تمرير كل مستوى اختبارات ميدانية على التحقق من صحة.
Validate () إبطال التحقق من صحة ()
تنفيذ ما يلي:
- RocksIValidatable :: التحقق من صحة ()
__get ( __ الحصول على باطل ( ) $ اسم)
__set ( باطل __ مجموعة ( , $ فار، ) $ varValue)
__toString () باطل __ toString ()