code: public static function getInstance(Configurator $configurator = null): self
      {
          if (self::$instance === null) {
              if ($configurator === null) {
                  throw new DatabaseException('Configurator Missing');
              }
              self::$instance = new self($configurator);
          } elseif ($configurator !== null) {
              throw new DatabaseException('Configurator Already Setup');
          }
  
          return self::$instance;
      }
docs: @param Configurator|null $configurator
  
  @throws DatabaseException
  
  @return Database