class ConnectionFactory (View source)
protected Container | $container | The IoC container instance. |
void | __construct(Container $container) Create a new connection factory instance. | |
Connection | make(array $config, string|null $name = null) Establish a PDO connection based on the configuration. | |
array | parseConfig(array $config, string $name) Parse and prepare the database configuration. | |
Connection | createSingleConnection(array $config) Create a single database connection instance. | |
Connection | createReadWriteConnection(array $config) Create a read / write database connection instance. | |
Closure | createReadPdo(array $config) Create a new PDO instance for reading. | |
array | getReadConfig(array $config) Get the read configuration for a read / write connection. | |
array | getWriteConfig(array $config) Get the write configuration for a read / write connection. | |
array | getReadWriteConfig(array $config, string $type) Get a read / write level configuration. | |
array | mergeReadWriteConfig(array $config, array $merge) Merge a configuration for a read / write connection. | |
Closure | createPdoResolver(array $config) Create a new Closure that resolves to a PDO instance. | |
Closure | createPdoResolverWithHosts(array $config) Create a new Closure that resolves to a PDO instance with a specific host or an array of hosts. | |
array | parseHosts(array $config) Parse the hosts configuration item into an array. | |
Closure | createPdoResolverWithoutHosts(array $config) Create a new Closure that resolves to a PDO instance where there is no configured host. | |
ConnectorInterface | createConnector(array $config) Create a connector instance based on the configuration. | |
Connection | createConnection(string $driver, PDO|Closure $connection, string $database, string $prefix = '', array $config = []) Create a new connection instance. |
Create a new connection factory instance.
Establish a PDO connection based on the configuration.
Parse and prepare the database configuration.
Create a single database connection instance.
Create a read / write database connection instance.
Create a new PDO instance for reading.
Get the read configuration for a read / write connection.
Get the write configuration for a read / write connection.
Get a read / write level configuration.
Merge a configuration for a read / write connection.
Create a new Closure that resolves to a PDO instance.
Create a new Closure that resolves to a PDO instance with a specific host or an array of hosts.
Parse the hosts configuration item into an array.
Create a new Closure that resolves to a PDO instance where there is no configured host.
Create a connector instance based on the configuration.
Create a new connection instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Database/Connectors/ConnectionFactory.html