272 lines
5.7 KiB
YAML
272 lines
5.7 KiB
YAML
name: ConnectionFactory
|
|
class_comment: null
|
|
dependencies:
|
|
- name: Container
|
|
type: class
|
|
source: Illuminate\Contracts\Container\Container
|
|
- name: Connection
|
|
type: class
|
|
source: Illuminate\Database\Connection
|
|
- name: MariaDbConnection
|
|
type: class
|
|
source: Illuminate\Database\MariaDbConnection
|
|
- name: MySqlConnection
|
|
type: class
|
|
source: Illuminate\Database\MySqlConnection
|
|
- name: PostgresConnection
|
|
type: class
|
|
source: Illuminate\Database\PostgresConnection
|
|
- name: SQLiteConnection
|
|
type: class
|
|
source: Illuminate\Database\SQLiteConnection
|
|
- name: SqlServerConnection
|
|
type: class
|
|
source: Illuminate\Database\SqlServerConnection
|
|
- name: Arr
|
|
type: class
|
|
source: Illuminate\Support\Arr
|
|
- name: InvalidArgumentException
|
|
type: class
|
|
source: InvalidArgumentException
|
|
- name: PDOException
|
|
type: class
|
|
source: PDOException
|
|
properties:
|
|
- name: container
|
|
visibility: protected
|
|
comment: '# * The IoC container instance.
|
|
|
|
# *
|
|
|
|
# * @var \Illuminate\Contracts\Container\Container'
|
|
methods:
|
|
- name: __construct
|
|
visibility: public
|
|
parameters:
|
|
- name: container
|
|
comment: "# * The IoC container instance.\n# *\n# * @var \\Illuminate\\Contracts\\\
|
|
Container\\Container\n# */\n# protected $container;\n# \n# /**\n# * Create a new\
|
|
\ connection factory instance.\n# *\n# * @param \\Illuminate\\Contracts\\Container\\\
|
|
Container $container\n# * @return void"
|
|
- name: make
|
|
visibility: public
|
|
parameters:
|
|
- name: config
|
|
- name: name
|
|
default: 'null'
|
|
comment: '# * Establish a PDO connection based on the configuration.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @param string|null $name
|
|
|
|
# * @return \Illuminate\Database\Connection'
|
|
- name: parseConfig
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
- name: name
|
|
comment: '# * Parse and prepare the database configuration.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @param string $name
|
|
|
|
# * @return array'
|
|
- name: createSingleConnection
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Create a single database connection instance.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return \Illuminate\Database\Connection'
|
|
- name: createReadWriteConnection
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Create a read / write database connection instance.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return \Illuminate\Database\Connection'
|
|
- name: createReadPdo
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Create a new PDO instance for reading.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return \Closure'
|
|
- name: getReadConfig
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Get the read configuration for a read / write connection.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return array'
|
|
- name: getWriteConfig
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Get the write configuration for a read / write connection.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return array'
|
|
- name: getReadWriteConfig
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
- name: type
|
|
comment: '# * Get a read / write level configuration.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @param string $type
|
|
|
|
# * @return array'
|
|
- name: mergeReadWriteConfig
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
- name: merge
|
|
comment: '# * Merge a configuration for a read / write connection.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @param array $merge
|
|
|
|
# * @return array'
|
|
- name: createPdoResolver
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Create a new Closure that resolves to a PDO instance.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return \Closure'
|
|
- name: createPdoResolverWithHosts
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Create a new Closure that resolves to a PDO instance with a specific
|
|
host or an array of hosts.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return \Closure
|
|
|
|
# *
|
|
|
|
# * @throws \PDOException'
|
|
- name: parseHosts
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Parse the hosts configuration item into an array.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return array
|
|
|
|
# *
|
|
|
|
# * @throws \InvalidArgumentException'
|
|
- name: createPdoResolverWithoutHosts
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Create a new Closure that resolves to a PDO instance where there is
|
|
no configured host.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return \Closure'
|
|
- name: createConnector
|
|
visibility: public
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Create a connector instance based on the configuration.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return \Illuminate\Database\Connectors\ConnectorInterface
|
|
|
|
# *
|
|
|
|
# * @throws \InvalidArgumentException'
|
|
- name: createConnection
|
|
visibility: protected
|
|
parameters:
|
|
- name: driver
|
|
- name: connection
|
|
- name: database
|
|
- name: prefix
|
|
default: ''''''
|
|
- name: config
|
|
default: '[]'
|
|
comment: '# * Create a new connection instance.
|
|
|
|
# *
|
|
|
|
# * @param string $driver
|
|
|
|
# * @param \PDO|\Closure $connection
|
|
|
|
# * @param string $database
|
|
|
|
# * @param string $prefix
|
|
|
|
# * @param array $config
|
|
|
|
# * @return \Illuminate\Database\Connection
|
|
|
|
# *
|
|
|
|
# * @throws \InvalidArgumentException'
|
|
traits:
|
|
- Illuminate\Contracts\Container\Container
|
|
- Illuminate\Database\Connection
|
|
- Illuminate\Database\MariaDbConnection
|
|
- Illuminate\Database\MySqlConnection
|
|
- Illuminate\Database\PostgresConnection
|
|
- Illuminate\Database\SQLiteConnection
|
|
- Illuminate\Database\SqlServerConnection
|
|
- Illuminate\Support\Arr
|
|
- InvalidArgumentException
|
|
- PDOException
|
|
interfaces: []
|