Query\Connection_Manager
Connection manager class to manage connections for the Query method
Synopsis
- // members
- private array $connections = ;
- private static Connection_Manager $instance = null;
- // methods
- private void __construct()
- public void __clone()
- public void __sleep()
- public void __wakeup()
- public static Connection_Manager get_instance()
- public Query_Builder get_connection()
- public Query_Builder connect()
- public array parse_params()
- private string create_dsn()
Members
private
- $connections
—
array
Map of named database connections - $instance
—
Query\Connection_Manager
Class instance variable
Methods
private
- __construct() — Private constructor to prevent multiple instances
- create_dsn() — Create the dsn from the db type and params
public
- __clone() — Private clone method to prevent cloning
- __sleep() — Prevent serialization of this object
- __wakeup() — Make sure serialize/deserialize doesn't work
- connect() — Parse the passed parameters and return a connection
- get_connection() — Returns the connection specified by the name given
- get_instance() — Return a connection manager instance
- parse_params() — Parses params into a dsn and option array
History
-
2015-07-30T16:40:30-04:00 (commit #225017a)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Lots of refactoring -- accessors/mutators instead of direct access, reduce query builder test database connections, and simplify some logic
-
2015-07-29T16:51:17-04:00 (commit #8511c6a)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Move library into src folder, fix simpletest test runner
-
2015-07-20T15:27:35-04:00 (commit #7dbae40)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Remove php 5.4 style array
-
2015-07-20T15:24:21-04:00 (commit #cd7f904)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Add pdo_firebird driver
-
2015-07-17T16:01:41-04:00 (commit #b4118ce)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Update docs
-
2015-07-17T15:38:06-04:00 (commit #28f5cb2)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Fix Firebird tests and speed up tests by using one database connection for each query builder datbase test
-
2015-07-16T16:56:13-04:00 (commit #bfc3ea3)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Reorganize drivers into a more modern layout
-
2014-08-08T13:48:20-04:00 (commit #dd672df)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Reorganize classes to autoload by namespace
-
2014-08-08T12:48:14-04:00 (commit #0a0548d)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Remove some useless code, extract an exception into its own class
-
2014-06-09T17:02:14-04:00 (commit #1abd835)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Attempting some Quercus compatibility, test-suite runs with simpletest as well as PHPUnit
-
2014-04-24T14:50:53-04:00 (commit #993a2ab)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Allow camelCase method calls, update interfaces with missing methods
-
2014-04-23T15:53:16-04:00 (commit #aa5aa8e)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Docblock fixes and more dependency injection
-
2014-04-22T14:02:54-04:00 (commit #0a64edd)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Fix some typos and docblocks
-
2014-04-03T14:44:03-04:00 (commit #a333920)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Rename db_util to abstract_util, mark create_table method as deprecated
-
2014-04-03T13:28:30-04:00 (commit #4809016)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Add insert_batch methods to Firebird and SQLite
-
2014-04-02T18:53:48-04:00 (commit #bccea8c)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
A little cleanup of parser and connection code