WordPress – get wpdb class method names

get wpdb class method names using get_class_methods

<?php
global $wpdb;
$class = get_class ($wpdb);
echo "=====class=$class\n";
$methods = get_class_methods($class);
echo "=====methods=" . print_r($methods, true); 


Here is the outcome from above code:
=====class=wpdb
=====methods=Array
(
    [0] => __construct
    [1] => __destruct
    [2] => __get
    [3] => __set
    [4] => __isset
    [5] => __unset
    [6] => init_charset
    [7] => set_charset
    [8] => set_sql_mode
    [9] => set_prefix
    [10] => set_blog_id
    [11] => get_blog_prefix
    [12] => tables
    [13] => select
    [14] => _weak_escape
    [15] => _real_escape
    [16] => _escape
    [17] => escape
    [18] => escape_by_ref
    [19] => prepare
    [20] => esc_like
    [21] => print_error
    [22] => show_errors
    [23] => hide_errors
    [24] => suppress_errors
    [25] => flush
    [26] => db_connect
    [27] => check_connection
    [28] => query
    [29] => insert
    [30] => replace
    [31] => _insert_replace_helper
    [32] => update
    [33] => delete
    [34] => get_var
    [35] => get_row
    [36] => get_col
    [37] => get_results
    [38] => get_col_charset
    [39] => get_col_length
    [40] => strip_invalid_text_for_column
    [41] => get_col_info
    [42] => timer_start
    [43] => timer_stop
    [44] => bail
    [45] => check_database_version
    [46] => supports_collation
    [47] => get_charset_collate
    [48] => has_cap
    [49] => get_caller
    [50] => db_version
)

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments