PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 1.9.4
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v1.9.4
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / classes / WriteFile / WriteFileInterface.php

WriteFileInterface.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 1.9.4, at classes/WriteFile/WriteFileInterface.php

69 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Imagify\WriteFile;
3
4 defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
5
6 /**
7 * Interface to add and remove contents to a file.
8 *
9 * @since 1.9
10 * @author Grégory Viguier
11 */
12 interface WriteFileInterface {
13
14 /**
15 * Add new contents to the file.
16 *
17 * @since 1.9
18 * @access public
19 * @author Grégory Viguier
20 *
21 * @return bool|\WP_Error True on success. A \WP_Error object on error.
22 */
23 public function add();
24
25 /**
26 * Remove the related contents from the file.
27 *
28 * @since 1.9
29 * @access public
30 * @author Grégory Viguier
31 *
32 * @return bool|\WP_Error True on success. A \WP_Error object on error.
33 */
34 public function remove();
35
36 /**
37 * Get the path to the file.
38 *
39 * @since 1.9
40 * @access public
41 * @author Grégory Viguier
42 *
43 * @return string
44 */
45 public function get_file_path();
46
47 /**
48 * Tell if the file is writable.
49 *
50 * @since 1.9
51 * @access public
52 * @author Grégory Viguier
53 *
54 * @return bool|\WP_Error True if writable. A \WP_Error object if not.
55 */
56 public function is_file_writable();
57
58 /**
59 * Get new contents to write into the file.
60 *
61 * @since 1.9
62 * @access public
63 * @author Grégory Viguier
64 *
65 * @return string
66 */
67 public function get_new_contents();
68 }
69