ConnectionName
final class ConnectionName
Constants
| READ |
|
| WRITE |
|
Methods
__construct(string $requested, string $base, string|null $role = null)
Create a new parsed connection name instance.
static ConnectionName
parse(string $name)
Parse a database connection name.
static string|null
withoutWriteType(string|null $name)
Remove the write role when comparing model identities.
bool
isRead()
Determine if the parsed name requests the read side.
bool
isWrite()
Determine if the parsed name requests the write side.
Details
at line 18
__construct(string $requested, string $base, string|null $role = null)
Create a new parsed connection name instance.
at line 28
static ConnectionName
parse(string $name)
Parse a database connection name.
at line 54
static string|null
withoutWriteType(string|null $name)
Remove the write role when comparing model identities.
Read aliases remain distinct because they can select another endpoint.
at line 66
bool
isRead()
Determine if the parsed name requests the read side.
at line 74
bool
isWrite()
Determine if the parsed name requests the write side.