mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 23:08:41 +00:00
Add default case/exception for database type
This commit is contained in:
parent
bdf7b705cc
commit
24c6194f5c
|
|
@ -16,6 +16,7 @@ namespace phpOMS\Module;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabaseType;
|
use phpOMS\DataStorage\Database\DatabaseType;
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installer Abstract class.
|
* Installer Abstract class.
|
||||||
|
|
@ -86,6 +87,8 @@ class ActivateAbstract
|
||||||
$dbPool->get()->con->commit();
|
$dbPool->get()->con->commit();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ namespace phpOMS\Module;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabaseType;
|
use phpOMS\DataStorage\Database\DatabaseType;
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installer Abstract class.
|
* Installer Abstract class.
|
||||||
|
|
@ -86,6 +87,8 @@ class DeactivateAbstract
|
||||||
$dbPool->get()->con->commit();
|
$dbPool->get()->con->commit();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ declare(strict_types = 1);
|
||||||
namespace phpOMS\Module;
|
namespace phpOMS\Module;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabaseType;
|
use phpOMS\DataStorage\Database\DatabaseType;
|
||||||
|
use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
use phpOMS\System\File\Local\Directory;
|
use phpOMS\System\File\Local\Directory;
|
||||||
use phpOMS\System\File\PathException;
|
use phpOMS\System\File\PathException;
|
||||||
|
|
@ -79,6 +80,8 @@ class InstallerAbstract
|
||||||
|
|
||||||
$dbPool->get()->con->commit();
|
$dbPool->get()->con->commit();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user