52
52
* @version $Revision$
53
53
* @author Konsta Vesterinen <[email protected] >
54
54
* @author Lukas Smith <[email protected] > (MDB2 library)
55
+ *
56
+ * @property Doctrine_Export $export
55
57
*/
56
58
abstract class Doctrine_Connection extends Doctrine_Configurable implements Countable, IteratorAggregate, Serializable
57
59
{
@@ -241,41 +243,31 @@ public function isConnected()
241
243
}
242
244
243
245
/**
244
- * getOptions
245
- *
246
246
* Get array of all options
247
247
*
248
- * @return void
248
+ * @return array<string, mixed>
249
249
*/
250
- public function getOptions ()
250
+ public function getOptions (): array
251
251
{
252
252
return $ this ->options ;
253
253
}
254
254
255
255
/**
256
- * getOption
257
- *
258
- * Retrieves option
259
- *
260
- * @param string $option
261
- * @return void
256
+ * @return null|mixed
262
257
*/
263
- public function getOption ($ option )
258
+ public function getOption (string $ option )
264
259
{
265
260
if (isset ($ this ->options [$ option ])) {
266
261
return $ this ->options [$ option ];
267
262
}
268
263
}
269
264
270
265
/**
271
- * setOption
272
- *
273
266
* Set option value
274
267
*
275
- * @param string $option
276
- * @return void
268
+ * @return mixed
277
269
*/
278
- public function setOption ($ option , $ value )
270
+ public function setOption (string $ option , $ value )
279
271
{
280
272
return $ this ->options [$ option ] = $ value ;
281
273
}
@@ -1545,8 +1537,8 @@ public function dropDatabase()
1545
1537
* which is always guaranteed to exist. Mysql: 'mysql', PostgreSQL: 'postgres', etc.
1546
1538
* This value is set in the Doctrine_Export_{DRIVER} classes if required
1547
1539
*
1548
- * @param string $info
1549
- * @return void
1540
+ * @param array $info
1541
+ * @return Doctrine_Connection
1550
1542
*/
1551
1543
public function getTmpConnection ($ info )
1552
1544
{
@@ -1569,7 +1561,7 @@ public function getTmpConnection($info)
1569
1561
$ username = $ this ->getOption ('username ' );
1570
1562
$ password = $ this ->getOption ('password ' );
1571
1563
1572
- $ conn = $ this ->getManager ()->openConnection (array ( $ pdoDsn , $ username , $ password) , 'doctrine_tmp_connection ' , false );
1564
+ $ conn = $ this ->getManager ()->openConnection ([ $ pdoDsn , $ username , $ password] , 'doctrine_tmp_connection ' , false );
1573
1565
$ conn ->setOption ('username ' , $ username );
1574
1566
$ conn ->setOption ('password ' , $ password );
1575
1567
0 commit comments