add clear

This commit is contained in:
2020-04-30 22:09:08 +08:00
parent 7bda1dbcce
commit 44146ad916
6 changed files with 236 additions and 257 deletions
+3
View File
@@ -151,6 +151,9 @@ class Result
*/
public function append($key, $data)
{
if (!is_array($this->data)) {
$this->data = [];
}
$this->data[$key] = $data;
return $this;
}