From b0396f9b162f682f5822b547673b648b5b283346 Mon Sep 17 00:00:00 2001 From: Sleon4 Date: Sun, 2 Nov 2025 16:38:27 -0500 Subject: [PATCH] feat: Constants are added to define the database connections --- docker-compose.yml | 4 +-- src/LionDatabase/Connection.php | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a2b278f..22d35e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: - app: - container_name: database-app + php: + container_name: database-php build: context: . dockerfile: Dockerfile diff --git a/src/LionDatabase/Connection.php b/src/LionDatabase/Connection.php index 40f1d85..2171ad7 100644 --- a/src/LionDatabase/Connection.php +++ b/src/LionDatabase/Connection.php @@ -19,6 +19,51 @@ */ abstract class Connection extends StringFactory implements ConnectionConfigInterface { + /** + * @const CONNECTION_DEFAULT + */ + public const string CONNECTION_DEFAULT = 'default'; + + /** + * @const CONNECTION_CONNECTIONS + */ + public const string CONNECTION_CONNECTIONS = 'connections'; + + /** + * @const CONNECTION_TYPE + */ + public const string CONNECTION_TYPE = 'type'; + + /** + * @const CONNECTION_HOST + */ + public const string CONNECTION_HOST = 'host'; + + /** + * @const CONNECTION_PORT + */ + public const string CONNECTION_PORT = 'port'; + + /** + * @const CONNECTION_DBNAME + */ + public const string CONNECTION_DBNAME = 'dbname'; + + /** + * @const CONNECTION_USER + */ + public const string CONNECTION_USER = 'user'; + + /** + * @const CONNECTION_PASSWORD + */ + public const string CONNECTION_PASSWORD = 'password'; + + /** + * @const CONNECTION_OPTIONS + */ + public const string CONNECTION_OPTIONS = 'options'; + /** * Default settings for database connections. *