| [ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
This file is part of Aura for PHP.
| License: | https://opensource.org/licenses/MIT MIT |
| File Size: | 207 lines (5 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
ConnectionLocator:: (8 methods):
__construct()
setDefault()
getDefault()
setRead()
getRead()
setWrite()
getWrite()
getConnection()
Class: ConnectionLocator - X-Ref
Manages ExtendedPdo instances for default, read, and write connections.| __construct(?callable $default = null,array $read = [],array $write = []) X-Ref |
| Constructor. param: callable|null $default A callable to create a default connection. param: array $read An array of callables to create read connections. param: array $write An array of callables to create write connections. |
| setDefault(callable $callable) X-Ref |
| Sets the default connection factory. param: callable $callable The factory for the connection. return: void |
| getDefault() X-Ref |
| Returns the default connection object. return: ExtendedPdoInterface |
| setRead(string $name, callable $callable) X-Ref |
| Sets a read connection factory by name. param: string $name The name of the connection. param: callable $callable The factory for the connection. return: void |
| getRead(string $name = '') X-Ref |
| Returns a read connection by name; if no name is given, picks a random connection; if no read connections are present, returns the default connection. param: string $name The read connection name to return. return: ExtendedPdoInterface |
| setWrite(string $name, callable $callable) X-Ref |
| Sets a write connection factory by name. param: string $name The name of the connection. param: callable $callable The factory for the connection. return: void |
| getWrite(string $name = '') X-Ref |
| Returns a write connection by name; if no name is given, picks a random connection; if no write connections are present, returns the default connection. param: string $name The write connection name to return. return: ExtendedPdoInterface |
| getConnection(string $type, string $name) X-Ref |
| Returns a connection by name. param: string $type The connection type ('read' or 'write'). param: string $name The name of the connection. return: ExtendedPdoInterface |
| Generated: Wed Nov 5 05:10:36 2025 | Cross-referenced by PHPXref 0.7.1 |