Database Enum
The Database enum defines the supported database types within the Sparkle package. Enums provide a clear and type-safe way to specify database configurations.
Available Values
| Constant | Value | Description |
|---|---|---|
MYSQL | 'mysql' | Represents a MySQL(Mariadb) database connection. |
Example Usage
You can use the Database enum to specify a database type within your application:
php
use Sirmerdas\Sparkle\Enums\Database;
$databaseType = Database::MYSQL;
if ($databaseType === Database::MYSQL) {
echo "Using MySQL database.";
}This enum can be used when defining database configurations, making database type checks more readable and maintainable.