Form_Guard is used to prevent "form pumping"
Form_Guard is used to prevent "form pumping" or "submit pumping" which happens when impatient site visitor clicks more than once on submit button. This class is not intended to be directly used by the users.
Located in /form/form_guard.class.php [line 33]
Tangra_Class | --Form_Guard
Properties
Methods
Inherited From Tangra_Class
Tangra_Class::get_class_name() Alias of get_class(). Exist because of historical reasons. Tangra_Class::__set() Overides PHP built-in method and just throws exception if called. Purpose - to "forbid" autosetting of nonexisting class properties.
Form object
Vars manager for guarded pairs
Must be "permanent vars storage as Session_Vars_Manager ot Trhread_Vars_Manager
Form_Guard __construct( Guardable_Form &$form, Vars_Manager &$form_guarded_pairs_vm, Guardable_Form $form, Vars_Manager $form_guarded_pairs_vm )
Constructor
unknown check_guard_pair( unknown_type $form_id )
Checks if the value received by the last submit is valid
integer generate_new_random( )
Generates random number
string get_new_form_id( )
Generates new form_id
boolean is_fresh_submit( string $form_id )
Checks if it is first time submit, i.e. not second transmitions of same data caused by pumping on submit button
string new_guard_pair( )
Generates new guard pair
void set_form_id_value( string $value )
Sets form_id value
void set_guard_value( unknown_type $value )
Sets guard value