Skip to content

Commit

Permalink
Adding set all instances func to restore db state from json (#36)
Browse files Browse the repository at this point in the history
* Adding set all instances func to restore db state from json

* remove whitespace

* Adding comment
  • Loading branch information
jzimmerman95 authored and Scott Sandler committed Oct 21, 2019
1 parent 2822968 commit 06884b2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ public static function getAll(): dict<string, this> {
return static::$instances;
}

/**
* This will override everything in $instances
*/
public static function setAll(dict<string, Server> $instances): void {
static::$instances = $instances;
}

public static function get(string $name): ?this {
return static::$instances[$name] ?? null;
}
Expand Down

0 comments on commit 06884b2

Please sign in to comment.