PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.1
6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 5.2.2 5.3 All 153 releases
mainwp / modules / logs / classes / class-log-db-driver.php

class-log-db-driver.php in MainWP Dashboard: Self-hosted WordPress Management for Agencies 6.1, at modules/logs/classes/class-log-db-driver.php

63 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Interface for a Database Driver.
4 *
5 * @package MainWP/Dashboard
6 */
7
8 namespace MainWP\Dashboard\Module\Log;
9
10 // Exit if accessed directly.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 /**
16 * Interface - Log_DB_Driver
17 */
18 interface Log_DB_Driver {
19 /**
20 * Insert a record
21 *
22 * @param array $data Data to be insert into the database.
23 *
24 * @return int
25 */
26 public function insert_record( $data );
27
28 /**
29 * Retrieve records
30 *
31 * @param array $args Argument to filter the result by.
32 *
33 * @return array
34 */
35 public function get_records( $args );
36
37 /**
38 * Returns array of existing values for requested column.
39 * Used to fill search filters with only used items, instead of all items.
40 *
41 * @param string $column Column to pull data from.
42 *
43 * @return array
44 */
45 public function get_column_values( $column );
46
47 /**
48 * Public getter to return the names of the tables this driver manages.
49 *
50 * @return array
51 */
52 public function get_table_names();
53
54
55
56 /**
57 * Purge storage.
58 *
59 * @param \MainWP\Dashboard\Module\Log\Log_Manager $manager Instance of the manager.
60 */
61 public function purge_storage( $manager );
62 }
63