1
0
mirror of https://github.com/danog/file.git synced 2024-11-30 04:19:39 +01:00

Update for loop registry changes

This commit is contained in:
Aaron Piotrowski 2016-08-12 10:47:55 -05:00
parent 1725c684a0
commit b20530b89e

View File

@ -13,14 +13,14 @@ const LOOP_STATE_IDENTIFIER = Driver::class;
*/
function filesystem(Driver $driver = null) {
if ($driver === null) {
$driver = Loop::fetchState(LOOP_STATE_IDENTIFIER);
$driver = Loop::getState(LOOP_STATE_IDENTIFIER);
if ($driver) {
return $driver;
}
$driver = driver();
}
Loop::storeState(LOOP_STATE_IDENTIFIER, $driver);
Loop::setState(LOOP_STATE_IDENTIFIER, $driver);
return $driver;
}