PHP Class RTDBUpdate, rtMedia

Afficher le fichier Open project: rtCamp/rtMedia Class Usage Examples

Méthodes publiques

Свойство Type Description
$db_version String
$db_version_option_name
$install_db_version
$mu_single_table
$plugin_path
$rt_plugin_info
$schema_path

Méthodes publiques

Méthode Description
__construct ( $current_version = false, $plugin_path = false, $schema_path = false, $mu_single_table = false ) Set db current and installed version and also plugin info in rt_plugin_info variable.
check_upgrade ( ) : boolean Check upgrade by comparing version db_version.
create_table ( string $sql ) : void Create table using dbDelta.
do_upgrade ( ) : void Do upgrade by comparing version db_version.
genrate_sql ( string $file_name, string $file_content ) : string Genrate sql query.
genrate_table_name ( string $file_name ) : string Genrate table_name.
get_db_version_option_name ( ) : string Get db_version option name.
get_install_db_version ( ) : string Get installed db_version.
table_exists ( string $table ) : boolean Check if table_exists.

Method Details

__construct() public méthode

Set db current and installed version and also plugin info in rt_plugin_info variable.
public __construct ( $current_version = false, $plugin_path = false, $schema_path = false, $mu_single_table = false )

check_upgrade() public méthode

Check upgrade by comparing version db_version.
public check_upgrade ( ) : boolean
Résultat boolean

create_table() public méthode

Create table using dbDelta.
public create_table ( string $sql ) : void
$sql string
Résultat void

do_upgrade() public méthode

If db_version > install_db_version, then perform.
public do_upgrade ( ) : void
Résultat void

genrate_sql() public méthode

Genrate sql query.
public genrate_sql ( string $file_name, string $file_content ) : string
$file_name string
$file_content string
Résultat string sql query

genrate_table_name() public méthode

Genrate table_name.
public genrate_table_name ( string $file_name ) : string
$file_name string
Résultat string

get_db_version_option_name() public méthode

Get db_version option name.
public get_db_version_option_name ( ) : string
Résultat string

get_install_db_version() public méthode

Get installed db_version.
public get_install_db_version ( ) : string
Résultat string

table_exists() static public méthode

Check if table_exists.
static public table_exists ( string $table ) : boolean
$table string
Résultat boolean

Property Details

$db_version public_oe property

String
public $db_version

$db_version_option_name public_oe property

public $db_version_option_name

$install_db_version public_oe property

public $install_db_version

$mu_single_table public_oe property

public $mu_single_table

$plugin_path public_oe property

public $plugin_path

$rt_plugin_info public_oe property

public $rt_plugin_info

$schema_path public_oe property

public $schema_path