Query\ConnectionManager
Connection manager class to manage connections for the Query method
Synopsis
class ConnectionManager
{
- // methods
- public void __clone()
- public void __sleep()
- public void __wakeup()
- public static ConnectionManager getInstance()
- public QueryBuilderInterface getConnection()
- public QueryBuilderInterface connect()
- public array parseParams()
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
129 | UndefinedVariable | Avoid using undefined variables such as '$dsn' which will lead to PHP notices. |
129 | UndefinedVariable | Avoid using undefined variables such as '$options' which will lead to PHP notices. |
135 | ShortVariable | Avoid variables with short names like $db. Configured minimum length is 3. |
136 | UndefinedVariable | Avoid using undefined variables such as '$dsn' which will lead to PHP notices. |
136 | UndefinedVariable | Avoid using undefined variables such as '$options' which will lead to PHP notices. |
137 | UndefinedVariable | Avoid using undefined variables such as '$dsn' which will lead to PHP notices. |
137 | UndefinedVariable | Avoid using undefined variables such as '$options' which will lead to PHP notices. |
155 - 157 | ElseExpression | The method connect uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. |
196 - 198 | ElseExpression | The method parseParams uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. |
Methods
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
- getConnection() — Returns the connection specified by the name given
- getInstance() — Return a connection manager instance
- parseParams() — Parses params into a dsn and option array