DbCache_WpdbInjection.php
3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php
namespace W3TC;
/**
* class DbCache_WpdbInjection
* Allows to perform own operation instead of default behaviour of wpdb
* without inheritance
*/
class DbCache_WpdbInjection {
/**
* Top database-connection object.
* Initialized by DbCache_Wpdb::instance
*
* @var object
*/
protected $wpdb_mixin = null;
/**
* Database-connection using overrides of next processor in queue
* Initialized by DbCache_Wpdb::instance
*
* @var object
*/
protected $next_injection = null;
/**
* initialization of object so that it can be used
*/
function initialize_injection( $wpdb_mixin, $next_injection ) {
$this->wpdb_mixin = $wpdb_mixin;
$this->next_injection = $next_injection;
}
/**
* Placeholder for database initialization
*/
function initialize() {
return $this->wpdb_mixin->default_initialize();
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function insert( $table, $data, $format = null ) {
return $this->wpdb_mixin->default_insert( $table, $data, $format );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function query( $query ) {
return $this->wpdb_mixin->default_query( $query );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function replace( $table, $data, $format = null ) {
return $this->wpdb_mixin->default_replace( $table, $data, $format );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function update( $table, $data, $where, $format = null, $where_format = null ) {
return $this->wpdb_mixin->default_update( $table, $data, $where, $format, $where_format );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function delete( $table, $where, $where_format = null ) {
return $this->wpdb_mixin->default_delete( $table, $where, $where_format );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function init_charset() {
return $this->wpdb_mixin->default_init_charset();
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function set_charset( $dbh, $charset = null, $collate = null ) {
return $this->wpdb_mixin->default_set_charset( $dbh, $charset, $collate );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function flush() {
return $this->wpdb_mixin->default_flush();
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function check_database_version( $dbh_or_table = false ) {
return $this->wpdb_mixin->default_check_database_version( $dbh_or_table );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function supports_collation( $dbh_or_table = false ) {
return $this->wpdb_mixin->default_supports_collation( $dbh_or_table );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function has_cap( $db_cap, $dbh_or_table = false ) {
return $this->wpdb_mixin->default_has_cap( $db_cap, $dbh_or_table );
}
/**
* Placeholder for apropriate wp_db method replacement.
* By default calls wp_db implementation
*/
function db_version( $dbh_or_table = false ) {
return $this->wpdb_mixin->default_db_version( $dbh_or_table );
}
public function w3tc_footer_comment( $strings ) {
return $strings;
}
public function w3tc_usage_statistics_of_request( $storage ) {
}
public function flush_cache() {
return true;
}
}