NF_Abstracts_Migration

The Ninja Forms NF Abstracts Migration class.

Defined (1)

The class is defined in the following location(s).

/includes/Abstracts/Migration.php  
  1. abstract class NF_Abstracts_Migration 
  2. public $table_name = ''; 
  3.  
  4. public $charset_collate = ''; 
  5.  
  6. public $flag = ''; 
  7.  
  8. public function __construct( $table_name, $flag ) 
  9. global $wpdb; 
  10.  
  11. $this->table_name = $wpdb->prefix . $table_name; 
  12.  
  13. $this->charset_collate = $wpdb->get_charset_collate(); 
  14.  
  15. public function _run() 
  16. // Check the flag 
  17. if( get_option( $this->flag, FALSE ) ) return; 
  18.  
  19. // Run the migration 
  20. $this->run(); 
  21.  
  22. // Set the Flag 
  23. update_option( $this->flag, TRUE ); 
  24.  
  25. protected abstract function run();