| @@ -1,12 +1,22 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * Interface for a Database Driver. | |
| 4 | + * | |
| 5 | + * @todo Review. Heavy refactor maybe needed. | |
| 6 | + * @package WP_Stream | |
| 7 | + */ | |
| 8 | + | |
| 2 | 9 | namespace WP_Stream; |
| 3 | 10 | |
| 11 | +/** | |
| 12 | + * Interface - DB_Driver | |
| 13 | + */ | |
| 4 | 14 | interface DB_Driver { |
| 5 | 15 | /** |
| 6 | 16 | * Insert a record |
| 7 | 17 | * |
| 8 | - * @param array $data | |
| 18 | + * @param array $data Data to be insert into the database. | |
| 9 | 19 | * |
| 10 | 20 | * @return int |
| 11 | 21 | */ |
| 12 | 22 | public function insert_record( $data ); |
| @@ -13,9 +23,9 @@ | ||
| 13 | 23 | |
| 14 | 24 | /** |
| 15 | 25 | * Retrieve records |
| 16 | 26 | * |
| 17 | - * @param array $args | |
| 27 | + * @param array $args Argument to filter the result by. | |
| 18 | 28 | * |
| 19 | 29 | * @return array |
| 20 | 30 | */ |
| 21 | 31 | public function get_records( $args ); |
| @@ -23,9 +33,9 @@ | ||
| 23 | 33 | /** |
| 24 | 34 | * Returns array of existing values for requested column. |
| 25 | 35 | * Used to fill search filters with only used items, instead of all items. |
| 26 | 36 | * |
| 27 | - * @param string $column | |
| 37 | + * @param string $column Column to pull data from. | |
| 28 | 38 | * |
| 29 | 39 | * @return array |
| 30 | 40 | */ |
| 31 | 41 | public function get_column_values( $column ); |
| @@ -30,9 +40,9 @@ | ||
| 30 | 40 | */ |
| 31 | 41 | public function get_column_values( $column ); |
| 32 | 42 | |
| 33 | 43 | /** |
| 34 | - * Public getter to return table names | |
| 44 | + * Public getter to return the names of the tables this driver manages. | |
| 35 | 45 | * |
| 36 | 46 | * @return array |
| 37 | 47 | */ |
| 38 | 48 | public function get_table_names(); |