| @@ -6,52 +6,57 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace MainWP\Dashboard\Module\Log; |
| 9 | 9 | |
| 10 | +// Exit if accessed directly. | |
| 11 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 12 | + exit; | |
| 13 | +} | |
| 14 | + | |
| 10 | 15 | /** |
| 11 | 16 | * Interface - Log_DB_Driver |
| 12 | 17 | */ |
| 13 | 18 | interface Log_DB_Driver { |
| 14 | - /** | |
| 15 | - * Insert a record | |
| 16 | - * | |
| 17 | - * @param array $data Data to be insert into the database. | |
| 18 | - * | |
| 19 | - * @return int | |
| 20 | - */ | |
| 21 | - public function insert_record( $data ); | |
| 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 ); | |
| 22 | 27 | |
| 23 | - /** | |
| 24 | - * Retrieve records | |
| 25 | - * | |
| 26 | - * @param array $args Argument to filter the result by. | |
| 27 | - * | |
| 28 | - * @return array | |
| 29 | - */ | |
| 30 | - public function get_records( $args ); | |
| 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 ); | |
| 31 | 36 | |
| 32 | - /** | |
| 33 | - * Returns array of existing values for requested column. | |
| 34 | - * Used to fill search filters with only used items, instead of all items. | |
| 35 | - * | |
| 36 | - * @param string $column Column to pull data from. | |
| 37 | - * | |
| 38 | - * @return array | |
| 39 | - */ | |
| 40 | - public function get_column_values( $column ); | |
| 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 ); | |
| 41 | 46 | |
| 42 | - /** | |
| 43 | - * Public getter to return the names of the tables this driver manages. | |
| 44 | - * | |
| 45 | - * @return array | |
| 46 | - */ | |
| 47 | - public function get_table_names(); | |
| 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(); | |
| 48 | 53 | |
| 49 | 54 | |
| 50 | 55 | |
| 51 | - /** | |
| 52 | - * Purge storage. | |
| 53 | - * | |
| 54 | - * @param \MainWP\Dashboard\Module\Log\Log_Manager $manager Instance of the manager. | |
| 55 | - */ | |
| 56 | - public function purge_storage( $manager ); | |
| 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 ); | |
| 57 | 62 | } |