Skip to content

Commit cacb83d

Browse files
committed
Add auto_construct arg with default true
1 parent 42bae8e commit cacb83d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Libraries/Db/MariaDb.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public function __construct(string $driver = 'mysql')
2828
]);
2929
}
3030

31-
public static function instance(): self
31+
public static function instance(bool $auto_construct = true): ?self
3232
{
33-
if (!self::$instance) self::$instance = new self();
33+
if (!self::$instance && $auto_construct) self::$instance = new self();
3434
return self::$instance;
3535
}
3636
}

0 commit comments

Comments
 (0)