PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.2.7
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.2.7
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 / DB / DBInterface.php

DBInterface.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.2.7, at classes/DB/DBInterface.php

85 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Imagify\DB;
3
4 defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
5
6 /**
7 * Interface to interact with the database.
8 *
9 * @since 1.9
10 * @author Grégory Viguier
11 */
12 interface DBInterface {
13
14 /**
15 * Get the main Instance.
16 *
17 * @since 1.9
18 * @access public
19 * @author Grégory Viguier
20 *
21 * @return DBInterface Main instance.
22 */
23 public static function get_instance();
24
25 /**
26 * Retrieve a row by the primary key.
27 *
28 * @since 1.9
29 * @access public
30 * @author Grégory Viguier
31 *
32 * @param int $row_id A primary key.
33 * @return array
34 */
35 public function get( $row_id );
36
37 /**
38 * Update a row.
39 *
40 * @since 1.9
41 * @access public
42 * @author Grégory Viguier
43 *
44 * @param int $row_id A primary key.
45 * @param array $data New data.
46 * @param string $where A column name.
47 * @return bool
48 */
49 public function update( $row_id, $data = [], $where = '' );
50
51 /**
52 * Delete a row identified by the primary key.
53 *
54 * @since 1.9
55 * @access public
56 * @author Grégory Viguier
57 *
58 * @param int $row_id A primary key.
59 * @return bool
60 */
61 public function delete( $row_id );
62
63 /**
64 * Default column values.
65 *
66 * @since 1.9
67 * @access public
68 * @author Grégory Viguier
69 *
70 * @return array
71 */
72 public function get_column_defaults();
73
74 /**
75 * Get the primary column name.
76 *
77 * @since 1.9
78 * @access public
79 * @author Grégory Viguier
80 *
81 * @return string
82 */
83 public function get_primary_key();
84 }
85