Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7438969
Driver.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
Driver.php
View Options
<?php
namespace
Doctrine\DBAL\Driver\IBMDB2
;
use
Doctrine\DBAL\Driver\AbstractDB2Driver
;
use
Doctrine\DBAL\Driver\IBMDB2\Exception\ConnectionFailed
;
use
SensitiveParameter
;
use
function
db2_connect
;
use
function
db2_pconnect
;
final
class
Driver
extends
AbstractDB2Driver
{
/**
* {@inheritDoc}
*
* @return Connection
*/
public
function
connect
(
#[SensitiveParameter]
array
$params
)
{
$dataSourceName
=
DataSourceName
::
fromConnectionParameters
(
$params
)->
toString
();
$username
=
$params
[
'user'
]
??
''
;
$password
=
$params
[
'password'
]
??
''
;
$driverOptions
=
$params
[
'driverOptions'
]
??
[];
if
(!
empty
(
$params
[
'persistent'
]))
{
$connection
=
db2_pconnect
(
$dataSourceName
,
$username
,
$password
,
$driverOptions
);
}
else
{
$connection
=
db2_connect
(
$dataSourceName
,
$username
,
$password
,
$driverOptions
);
}
if
(
$connection
===
false
)
{
throw
ConnectionFailed
::
new
();
}
return
new
Connection
(
$connection
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 14:49 (8 h, 48 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c5/cc/f207f612f34caa7da1c9c1ac8082
Default Alt Text
Driver.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment