Your Developer Exam showed me just how much there is to PHP. "Il tuo Esame dello sviluppatore mi ha mostrato quanto c'è di PHP."
Ross

RocksForm Classe

Descrizione

Implementa le interfacce:

  • RocksIValidatable

Questo rappresenta un modulo a pagina.

Questo semplifica problemi comuni a che fare con la gestione e validazione dei form.

  • Dominic Skinner autore: Dominic Skinner
  • 0.2.1 Versione: 0.2.1

) Trova in / RocksForm.php (linea 15)

Metodo Sommario
__construct () RocksForm __construct ()
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddEqualToComparison (string $ itemOne, string $ itemTwo, string $ messaggio)
AddField ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) vuoto AddField (string $ name, string $ type, string $ isRequired, [string $ formName = null], [string $ default = null])
AddFormIdentifier ( string $fieldName , string $formName ) vuoto AddFormIdentifier (string $ fieldName, string $ formName)
AddItemOneGreaterThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneGreaterThanTwoComparison (string $ itemOne, string $ itemTwo, string $ messaggio)
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneLessThanTwoComparison (string $ itemOne, string $ itemTwo, string $ messaggio)
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddNotEqualToComparison (string $ itemOne, string $ itemTwo, string $ messaggio)
GetErrors () vuoto GetErrors ()
GetField ( string $name ) RocksFormField GetField (string $ name)
SetFormType ( string $type ) vuoto SetFormType (string $ type)
Validate () void Validate ()
Metodi
(line 29 ) Costruttore __construct (linea 29)
  • public accesso: pubblico
__construct () RocksForm __construct ()
(line 162 ) AddEqualToComparison (linea 162)

Aggiunge un pari a confronto. Questo verifica che i valori dei campi del modulo sono uguali se non sono il messaggio viene visualizzato.

  • public accesso: pubblico
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddEqualToComparison (string $ itemOne, string $ itemTwo, string $ messaggio)
  • $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo da confrontare
  • $itemTwo : this is the name of the second field to compare stringa $ itemTwo: questo è il nome del secondo campo da confrontare
  • $message : this is message that is displayed if the fields are not equal stringa $ messaggio: questo è il messaggio che viene visualizzato se i campi non sono uguali
(line 134 ) AddField (linea 134)

Questo metodo aggiunge un altro campo al form. È necessario aggiungere un campo alla forma per restituire il valore in array associativo, nonché per eseguire valudation su di esso.

  • public accesso: pubblico
AddField ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) vuoto AddField (string $ name, string $ type, string $ isRequired, [string $ formName = null], [string $ default = null])
  • $name : this is the name of the form field stringa $ nome: questo è il nome del campo del form
  • $type : this is the type of the form field stringa $ tipo: questo è il tipo di campo modulo
  • $isRequired : this indicates if the field is a required field stringa $ isRequired: indica se il campo è un campo obbligatorio
  • $formName : this is the form name that field is part of. stringa $ formName: questo è il nome del modulo che fa parte del campo. Questo non è necessario se c'è una sola forma
  • $default : this is the default value of the field if it is left empty. stringa $ default: questo è il valore predefinito del campo, se è lasciato vuoto.
(line 81 ) AddFormIdentifier (linea 81)

Questo aggiunge un identificatore univoco formare questo indica che un campo del modulo appartiene solo a una delle forme sulla pagina. Nota avete solo bisogno di utilizzare questo metodo se ci sono più di un modulo su una pagina.

  • public accesso: pubblico
AddFormIdentifier ( string $fieldName , string $formName ) vuoto AddFormIdentifier (string $ fieldName, string $ formName)
  • $fieldName : this is the field name that uniquely identifies the form stringa $ fieldName: questo è il nome del campo che identifica in modo univoco la forma
  • $formName : this is the form name that you want to assign to the form stringa $ formName: è questo il nome del modulo che si desidera assegnare alla forma
(line 188 ) AddItemOneGreaterThanTwoComparison (linea 188)

Aggiunge una voce di uno è più grande di due item di confronto. Questo verifica che i valori della voce di campo modulo uno è maggiore di due item se non sono allora il messaggio viene visualizzato.

  • public accesso: pubblico
AddItemOneGreaterThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneGreaterThanTwoComparison (string $ itemOne, string $ itemTwo, string $ messaggio)
  • $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo da confrontare
  • $itemTwo : this is the name of the second field to compare stringa $ itemTwo: questo è il nome del secondo campo da confrontare
  • $message : this is message that is displayed if the validation fails stringa $ messaggio: questo è il messaggio che viene visualizzato se la convalida non riesce
(line 201 ) AddItemOneLessThanTwoComparison (linea 201)

Aggiunge un elemento è inferiore a confronto di due item. Questo verifica che i valori della voce di campo modulo sia inferiore voce di due se non sono allora il messaggio viene visualizzato.

  • public accesso: pubblico
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneLessThanTwoComparison (string $ itemOne, string $ itemTwo, string $ messaggio)
  • $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo da confrontare
  • $itemTwo : this is the name of the second field to compare stringa $ itemTwo: questo è il nome del secondo campo da confrontare
  • $message : this is message that is displayed if the validation fails stringa $ messaggio: questo è il messaggio che viene visualizzato se la convalida non riesce
(line 175 ) AddNotEqualToComparison (linea 175)

Aggiunge una non uguale a confronto. Questo verifica che i valori dei campi del modulo non sono uguali se non sono il messaggio viene visualizzato.

  • public accesso: pubblico
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddNotEqualToComparison (string $ itemOne, string $ itemTwo, string $ messaggio)
  • $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo da confrontare
  • $itemTwo : this is the name of the second field to compare stringa $ itemTwo: questo è il nome del secondo campo da confrontare
  • $message : this is message that is displayed if the fields are equal stringa $ messaggio: questo è il messaggio che viene visualizzato se i campi sono uguali
(line 43 ) GetAssociativeArrayData (linea 43)

Questo restituisce un array associativo con il nome del campo come chiave e il valore del campo come valore.

  • public accesso: pubblico
GetAssociativeArrayData () vuoto GetAssociativeArrayData ()
(line 106 ) GetCurrentForm (linea 106)

Questo restituisce la forma che ha appena eseguito il postback.

  • public accesso: pubblico
GetCurrentForm () vuoto GetCurrentForm ()
(line 209 ) GetErrors (linea 209)

Questo restituisce una serie di messaggi di errore. Questo assicura anche che il modulo è stato convalidato, se questo si chiama.

  • public accesso: pubblico
GetErrors () vuoto GetErrors ()
(line 145 ) GetField (linea 145)

Questo metodo restituisce un campo in base al suo nome

  • public accesso: pubblico
GetField ( string $name ) RocksFormField GetField (string $ name)
  • $name : this is the name of the form field to return stringa $ nome: questo è il nome del campo form per tornare
(line 66 ) SetFormType (linea 66)

Questo imposta il tipo di modulo

  • public accesso: pubblico
SetFormType ( string $type ) vuoto SetFormType (string $ type)
  • $type : this sets the type of form RocksPost or RocksGet string $ type: questo imposta il tipo di RocksPost forma o RocksGet
(line 222 ) Validate (linea 222)

Questo controlla che tutti i campi modulo passare tutti i test di validazione.

  • public accesso: pubblico
Validate () void validate ()

Commenti ad oggi: 1. Pagina 1 di 1. Valutazione media:
1:26am on Saturday, December 3rd, 2011 Cathy 01:26 il Sabato 3 dicembre 2011
È caduto dal letto senti giù. Questo ha brightneed la mia giornata!

immagine di sicurezza

Scritto da Dominic Skinner
Ultimo aggiornamento: 2011/10/25 16:00:38