Skip to content

Commit c113b4b

Browse files
committed
implemented: all data delete method
1 parent 43f5125 commit c113b4b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/App.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ public function show(){
136136
return false;
137137
}
138138

139+
/**
140+
* Show single record
141+
*
142+
* @param $id
143+
* @return string
144+
*/
139145
public function show_single($id){
140146

141147
$json_data = file_get_contents($this->data_location);
@@ -151,4 +157,13 @@ public function show_single($id){
151157

152158
return !empty($singleData) ? $single_data : false;
153159
}
160+
161+
/**
162+
* Delete all records
163+
*
164+
* @return string
165+
*/
166+
public function delete_all(){
167+
return unlink($this->data_location);
168+
}
154169
}

0 commit comments

Comments
 (0)