C:\xampp\htdocs\landing\wp-content\plugins\imagify\classes\Optimization\Data\Noop.php


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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<?php
namespace Imagify\Optimization\Data;

defined'ABSPATH' ) || die( 'Cheatin’ uh?' );

/**
 * Fallback class optimization data of "media groups" (aka attachments).
 *
 * @since  1.9
 * @author Grégory Viguier
 */
class Noop implements DataInterface {

    
/**
     * Tell if the given entry can be accepted in the constructor.
     * For example it can include `is_numeric( $id )` if the constructor accepts integers.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  mixed $id Whatever.
     * @return bool
     */
    
public static function constructor_accepts$id ) {
        return 
false;
    }

    
/**
     * Get the media instance.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return MediaInterface|false
     */
    
public function get_media() {
        return 
false;
    }

    
/**
     * Tell if the current media is valid.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return bool
     */
    
public function is_valid() {
        return 
false;
    }


    
/** ----------------------------------------------------------------------------------------- */
    /** OPTIMIZATION DATA ======================================================================= */
    /** ----------------------------------------------------------------------------------------- */

    /**
     * Check if the main file is optimized (by Imagify).
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return bool True if the media is optimized.
     */
    
public function is_optimized() {
        return 
false;
    }

    
/**
     * Check if the main file is optimized (NOT by Imagify).
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return bool True if the media is optimized.
     */
    
public function is_already_optimized() {
        return 
false;
    }

    
/**
     * Check if the main file is optimized (by Imagify).
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return bool True if the media is optimized.
     */
    
public function is_error() {
        return 
false;
    }

    
/**
     * Get the whole media optimization data.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return array The data. See parent method for details.
     */
    
public function get_optimization_data() {
        return [
            
'status' => '',
            
'level'  => false,
            
'sizes'  => [],
            
'stats'  => [
                
'original_size'  => 0,
                
'optimized_size' => 0,
                
'percent'        => 0,
            ],
        ];
    }

    
/**
     * Update the optimization data, level, and status for a size.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param string $size The size name.
     * @param array  $data The optimization data. See parent method for details.
     */
    
public function update_size_optimization_data$size, array $data ) {}

    
/**
     * Delete the media optimization data, level, and status.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     */
    
public function delete_optimization_data() {}

    
/**
     * Delete the optimization data for the given sizes.
     * If all sizes are removed, all optimization data is deleted.
     * Status and level are not modified nor removed if the "full" size is removed. This leaves the media in a Schrödinger state.
     *
     * @since  1.9.8
     * @access public
     * @author Grégory Viguier
     *
     * @param array $sizes A list of sizes to remove.
     */
    
public function delete_sizes_optimization_data( array $sizes ) {}

    
/**
     * Get the media's optimization level.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return int|bool The optimization level. False if not optimized.
     */
    
public function get_optimization_level() {
        return 
false;
    }

    
/**
     * Get the media's optimization status (success or error).
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return string The optimization status. An empty string if there is none.
     */
    
public function get_optimization_status() {
        return 
'';
    }

    
/**
     * Count number of optimized sizes.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return int Number of optimized sizes.
     */
    
public function get_optimized_sizes_count() {
        return 
0;
    }

    
/**
     * Get the original media's size (weight).
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  bool $human_format True to display the image human format size (1Mb).
     * @param  int  $decimals     Precision of number of decimal places.
     * @return string|int
     */
    
public function get_original_size$human_format true$decimals ) {
        return 
$human_format imagify_size_format0$decimals ) : 0;
    }

    
/**
     * Get the file size of the full size file.
     * If the webp size is available, it is used.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  bool $human_format True to display the image human format size (1Mb).
     * @param  int  $decimals     Precision of number of decimal places.
     * @param  bool $use_webp     Use the webp size if available.
     * @return string|int
     */
    
public function get_optimized_size$human_format true$decimals 2$use_webp true ) {
        return 
$human_format imagify_size_format0$decimals ) : 0;
    }


    
/** ----------------------------------------------------------------------------------------- */
    /** OPTIMIZATION STATS ====================================================================== */
    /** ----------------------------------------------------------------------------------------- */

    /**
     * Get one or all statistics of a specific size.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  string $size The thumbnail slug.
     * @param  string $key  The specific data slug.
     * @return array|string
     */
    
public function get_size_data$size 'full'$key '' ) {
        return 
$key '' : [];
    }

    
/**
     * Get the overall statistics data or a specific one.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  string $key The specific data slug.
     * @return array|string
     */
    
public function get_stats_data$key '' ) {
        return 
$key '' : [];
    }

    
/**
     * Get the optimized/original saving of the original image in percent.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return float A 2-decimals float.
     */
    
public function get_saving_percent() {
        return 
round( (float) 0);
    }

    
/**
     * Get the overall optimized/original saving (original image + all thumbnails) in percent.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @return float A 2-decimals float.
     */
    
public function get_overall_saving_percent() {
        return 
round( (float) 0);
    }
}
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586