Skip to content

Commit

Permalink
Update Kernel.php
Browse files Browse the repository at this point in the history
  • Loading branch information
esokullu authored May 24, 2019
1 parent f23d1f6 commit 798e2a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Pho/Kernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ public function flush(): void
/**
* Imports from a given Pho backup file
*
* This function flushes the database, use it with caution.
*
* @see Kernel::export()
*
* @param string $blob
Expand All @@ -188,6 +190,7 @@ public function import(string $blob): void
if(!$this->is_running) {
throw new Exceptions\KernelNotRunningException();
}
$this->database()->flushdb();
$import = unserialize($blob);
foreach($import as $key=>$value) {
$this->database()->restore($key, 0, $value);
Expand Down

0 comments on commit 798e2a3

Please sign in to comment.