This has got to be one of the most frequently updated PHP sites, keep up the good work... "Questo ha ottenuto di essere uno dei siti più frequentemente aggiornati PHP, mantenere il buon lavoro ..."
Max

RocksForm Class

Descrizione

Implementa le interfacce:

  • RocksIValidatable

Questo rappresenta una forma sulla pagina.

Questo semplifica problemi comuni a che fare con la gestione di moduli e di convalida.

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

) Situato in / RocksForm.php (linea 15)

Metodo Summary
__construct () RocksForm __construct ()
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddEqualToComparison (string $ itemOne, string $ itemTwo, string $ message)
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 $ message)
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneLessThanTwoComparison (string $ itemOne, string $ itemTwo, string $ message)
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddNotEqualToComparison (string $ itemOne, string $ itemTwo, string $ message)
GetErrors () annullare GetErrors ()
GetField ( string $name ) RocksFormField GetField (string $ name)
SetFormType ( string $type ) vuoto SetFormType (string $ type)
Validate () annullare Validate ()
Metodi
(line 29 ) Costruttore __ construct (linea 29)
  • public accesso: public
__construct () RocksForm costrutto __ ()
(line 162 ) AddEqualToComparison (linea 162)

Aggiunge un uguale a confronto. Ciò verifica che i valori dei campi sono uguali se non sono allora il messaggio viene visualizzato.

  • public accesso: public
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddEqualToComparison (string $ itemOne, string $ itemTwo, string $ message)
  • $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo di 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 al form per restituire il valore in un array associativo, nonché per eseguire valudation su di esso.

  • public accesso: public
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 string $ type: questo è il tipo del campo di 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 il campo fa parte. Questo non è necessaria se vi è solo una forma
  • $default : this is the default value of the field if it is left empty. $ stringa di default: questo è il valore predefinito del campo, se viene lasciato vuoto.
(line 81 ) AddFormIdentifier (linea 81)

Ciò aggiunge un identificatore unico modulo questo indica che un campo modulo appartiene solo una delle forme nella pagina. Nota: avete solo bisogno di utilizzare questo metodo se ci sono più di un modulo a una pagina.

  • public accesso: public
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 un elemento uno è più grande voce di due confronto. Ciò verifica che i valori del modulo elemento di campo è più grande di due voce se non sono allora il messaggio viene visualizzato.

  • public accesso: public
AddItemOneGreaterThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneGreaterThanTwoComparison (string $ itemOne, string $ itemTwo, string $ message)
  • $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo di 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 sia inferiore voce di due confronto. Ciò verifica che i valori dell'elemento campo modulo sia inferiore elemento due se non sono allora il messaggio viene visualizzato.

  • public accesso: public
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddItemOneLessThanTwoComparison (string $ itemOne, string $ itemTwo, string $ message)
  • $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo di 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. Ciò verifica che i valori dei campi modulo non sono uguali, se non vengono quindi il messaggio viene visualizzato.

  • public accesso: public
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) vuoto AddNotEqualToComparison (string $ itemOne, string $ itemTwo, string $ message)
  • $itemOne : this is the name of the first field to compare stringa $ itemOne: questo è il nome del primo campo di 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 di campo come chiave e il valore del campo come valore.

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

Questo restituisce la forma che ha appena pubblicato indietro.

  • public accesso: public
GetCurrentForm () GetCurrentForm vuoto ()
(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: public
GetErrors () annullare GetErrors ()
(line 145 ) GetField (linea 145)

Questo metodo restituisce un campo in base al suo nome

  • public accesso: public
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: public
SetFormType ( string $type ) vuoto SetFormType (string $ type)
  • $type : this sets the type of form RocksPost or RocksGet string $ type: imposta il tipo di forma o RocksPost RocksGet
(line 222 ) Validate (linea 222)

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

  • public accesso: public
Validate () annullare Validate ()

Commento a data: 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 sento giù. Questo ha brightneed la mia giornata!

security image

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