1 | <?php |
||
20 | class DBAL implements \Aimeos\MW\DB\Manager\Iface |
||
21 | { |
||
22 | private $config = null; |
||
23 | private $connections = []; |
||
24 | private $count = []; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * Initializes the database manager object |
||
29 | * |
||
30 | * @param \Aimeos\MW\Config\Iface $config Object holding the configuration data |
||
31 | */ |
||
32 | public function __construct( \Aimeos\MW\Config\Iface $config ) |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Cleans up the object |
||
40 | */ |
||
41 | public function __destruct() |
||
50 | |||
51 | |||
52 | /** |
||
53 | * Clones the objects inside. |
||
54 | */ |
||
55 | public function __clone() |
||
63 | |||
64 | |||
65 | /** |
||
66 | * Returns a database connection. |
||
67 | * |
||
68 | * @param string $name Name of the resource in configuration |
||
69 | * @return \Aimeos\MW\DB\Connection\Iface |
||
70 | */ |
||
71 | public function acquire( $name = 'db' ) |
||
102 | |||
103 | |||
104 | /** |
||
105 | * Releases the connection for reuse |
||
106 | * |
||
107 | * @param \Aimeos\MW\DB\Connection\Iface $connection Connection object |
||
108 | * @param string $name Name of resource |
||
109 | */ |
||
110 | public function release( \Aimeos\MW\DB\Connection\Iface $connection, $name = 'db' ) |
||
118 | |||
119 | |||
120 | /** |
||
121 | * Creates a new database connection. |
||
122 | * |
||
123 | * @param string $name Name to the database configuration in the resource file |
||
124 | * @param string $adapter Name of the database adapter, e.g. "mysql" |
||
125 | * @return \Aimeos\MW\DB\Connection\Iface Database connection |
||
126 | */ |
||
127 | protected function createConnection( $name, $adapter ) |
||
151 | } |
||
152 |
According to the PSR-2, the body of a default statement must start on the line immediately following the statement.
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.