Your open source Rocks PHP Library has really made developing PHP easier! واضاف "لم المفتوحة مصدر الصخور PHP مكتبة حقا النامية 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، [سلسلة formName $ = فارغة]، [سلسلة $ الافتراضي = فارغة])
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، سلسلة $ رسالة)
GetErrors () إفراغ GetErrors ()
GetField ( string $name ) RocksFormField GetField (سلسلة $ اسم)
SetFormType ( string $type ) باطل SetFormType (سلسلة $ نوع)
طرق
(line 29 ) __ المنشئ بناء (خط 29)
  • public وصول: الجمهور
__construct () RocksForm التركيبة __ ()
(line 162 ) AddEqualToComparison (خط 162)

ويضيف يساوي comparision. هذه الشيكات أن قيم حقول النموذج متساوون إذا لم تكن ثم يتم عرض الرسالة.

  • 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: هذا هو اسم الحقل الثاني للمقارنة
  • $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، [سلسلة 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. سلسلة $ الافتراضية: هذه هي القيمة الافتراضية للحقل إذا ما تركت فارغة.
(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)

ويضيف عنصر واحد هو أكبر من comparision 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: هذا هو اسم الحقل الثاني للمقارنة
  • $message : this is message that is displayed if the validation fails الخيط $ الرسالة: هذه هي الرسالة التي يتم عرضها في حالة فشل التحقق من الصحة
(line 201 ) AddItemOneLessThanTwoComparison (خط 201)

ويضيف عنصر واحد هو أقل من 2 comparision البند. هذه الشيكات التي قيم شكل بند حقل واحد هو أقل من البند 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: هذا هو اسم الحقل الثاني للمقارنة
  • $message : this is message that is displayed if the validation fails الخيط $ الرسالة: هذه هي الرسالة التي يتم عرضها في حالة فشل التحقق من الصحة
(line 175 ) AddNotEqualToComparison (خط 175)

ويضيف لا يساوي comparision. هذا يتحقق من أن قيم حقول النموذج ليست متساوية إذا لم تكن الرسالة ثم يتم عرض.

  • 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: هذا هو اسم الحقل الثاني للمقارنة
  • $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 من 1. متوسط ​​التقييم:
1:26am on Saturday, December 3rd, 2011 كاثي 01:26 يوم السبت 3 ديسمبر، 2011
سقطت من السرير شعور أسفل. وقد brightneed هذا اليوم بلدي!

أمن صورة

كتبه الدباغ دومينيك
آخر تحديث: 2011/10/25 16:00:38