You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently PDO parameters are still defined using magic strings: dsn, username, and password. We should add a class to use proper constants, and include connection options too:
<?phpnamespaceICanBoogie\ActiveRecord;
interfaceConnectionDefinition
{
/** * The Data Source Name. */constDSN = 'dsn';
/** * The user name for the DSN string. This parameter is optional for some PDO drivers. */constUSERNAME = 'username';
/** * The password for the DSN string. This parameter is optional for some PDO drivers. */constPASSWORD = 'password';
/** * A key=>value array of driver-specific connection options. */constDRIVER_OPTIONS = 'driver_options';
/** * Connection identifier. */constOPTION_ID = '#id';
/** * Charset and collate. * * Default: {@link DEFAULT_CHARSET_AND_COLLATE}. */constOPTION_CHARSET_AND_COLLATE = '#charset_and_collate';
/** * Table name prefix. */constOPTION_TABLE_NAME_PREFIX = '#table_name_prefix';
/** * Time zone offset used for the connection. * * Default: {@link DEFAULT_TIMEZONE}. */constOPTION_TIMEZONE = '#timezone';
/** * Default user name. */constDEFAULT_USERNAME = 'root';
/** * Default password. */constDEFAULT_PASSWORD = null;
/** * Default driver options. */constDEFAULT_DRIVER_OPTIONS = [];
/** * Default charset. */constDEFAULT_OPTION_CHARSET = 'utf8';
/** * Default collate. */constDEFAULT_OPTION_COLLATE = 'utf8_general_ci';
/** * Default value for {@link CHARSET_AND_COLLATE}. */constDEFAULT_OPTION_CHARSET_AND_COLLATE = "utf8/general_ci";
/** * Default value for {@link DEFAULT_TABLE_NAME_PREFIX}. */constDEFAULT_OPTION_TABLE_NAME_PREFIX = '';
/** * Default value for {@link TIMEZONE}. */constDEFAULT_OPTION_TIMEZONE = '+00:00';
}
The text was updated successfully, but these errors were encountered:
Currently PDO parameters are still defined using magic strings:
dsn
,username
, andpassword
. We should add a class to use proper constants, and include connection options too:The text was updated successfully, but these errors were encountered: