PluginProbe
Stream – Activity Log & Audit Trail / 3.7.0
Stream – Activity Log & Audit Trail v3.7.0
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
stream / classes / class-db-driver.php

class-db-driver.php in Stream – Activity Log & Audit Trail 3.7.0, at classes/class-db-driver.php

64 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 * @todo Review. Heavy refactor maybe needed.
6 * @package WP_Stream
7 */
8
9 namespace WP_Stream;
10
11 /**
12 * Interface - DB_Driver
13 */
14 interface DB_Driver {
15 /**
16 * Insert a record
17 *
18 * @param array $data Data to be insert into the database.
19 *
20 * @return int
21 */
22 public function insert_record( $data );
23
24 /**
25 * Retrieve records
26 *
27 * @param array $args Argument to filter the result by.
28 *
29 * @return array
30 */
31 public function get_records( $args );
32
33 /**
34 * Returns array of existing values for requested column.
35 * Used to fill search filters with only used items, instead of all items.
36 *
37 * @param string $column Column to pull data from.
38 *
39 * @return array
40 */
41 public function get_column_values( $column );
42
43 /**
44 * Public getter to return the names of the tables this driver manages.
45 *
46 * @return array
47 */
48 public function get_table_names();
49
50 /**
51 * Init storage.
52 *
53 * @param \WP_Stream\Plugin $plugin Instance of the plugin.
54 */
55 public function setup_storage( $plugin );
56
57 /**
58 * Purge storage.
59 *
60 * @param \WP_Stream\Plugin $plugin Instance of the plugin.
61 */
62 public function purge_storage( $plugin );
63 }
64