1 | <?php |
||
10 | abstract class Meta_Datastore extends Datastore { |
||
11 | /** |
||
12 | * Initialization tasks. |
||
13 | **/ |
||
14 | public function init() {} |
||
15 | |||
16 | /** |
||
17 | * Save the field value(s) into the database. |
||
18 | * |
||
19 | * @param Field $field The field to save. |
||
20 | */ |
||
21 | public function save(Field $field) { |
||
26 | |||
27 | /** |
||
28 | * Load the field value(s) from the database. |
||
29 | * |
||
30 | * @param Field $field The field to retrieve value for. |
||
31 | */ |
||
32 | public function load( Field $field ) { |
||
50 | |||
51 | /** |
||
52 | * Delete the field value(s) from the database. |
||
53 | * |
||
54 | * @param Field $field The field to delete. |
||
55 | */ |
||
56 | public function delete( Field $field ) { |
||
59 | |||
60 | /** |
||
61 | * Load complex field value(s) from the database. |
||
62 | * |
||
63 | * @param mixed $field The field to load values for. |
||
64 | */ |
||
65 | public function load_values( $field ) { |
||
79 | |||
80 | /** |
||
81 | * Delete complex field value(s) from the database. |
||
82 | * |
||
83 | * @param mixed $field The field to delete values for. |
||
84 | */ |
||
85 | public function delete_values( $field ) { |
||
98 | |||
99 | /** |
||
100 | * Retrieve the type of meta data. |
||
101 | */ |
||
102 | abstract public function get_meta_type(); |
||
103 | |||
104 | /** |
||
105 | * Retrieve the meta table name to query. |
||
106 | */ |
||
107 | abstract public function get_table_name(); |
||
108 | |||
109 | /** |
||
110 | * Retrieve the meta table field name to query by. |
||
111 | */ |
||
112 | abstract public function get_table_field_name(); |
||
113 | |||
114 | /** |
||
115 | * Set the ID of the datastore. |
||
116 | */ |
||
117 | abstract public function set_id( $id ); |
||
118 | |||
119 | /** |
||
120 | * Retrieve the ID of the datastore. |
||
121 | */ |
||
122 | abstract public function get_id(); |
||
123 | } |
||
124 |