Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7483970
Connection.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
Connection.php
View Options
<?php
namespace
Doctrine\DBAL\Driver\PDO\SQLSrv
;
use
Doctrine\DBAL\Driver\Middleware\AbstractConnectionMiddleware
;
use
Doctrine\DBAL\Driver\PDO\Connection
as
PDOConnection
;
use
Doctrine\DBAL\Driver\Statement
as
StatementInterface
;
use
Doctrine\Deprecations\Deprecation
;
use
PDO
;
final
class
Connection
extends
AbstractConnectionMiddleware
{
private
PDOConnection
$connection
;
public
function
__construct
(
PDOConnection
$connection
)
{
parent
::
__construct
(
$connection
);
$this
->
connection
=
$connection
;
}
public
function
prepare
(
string
$sql
):
StatementInterface
{
return
new
Statement
(
$this
->
connection
->
prepare
(
$sql
),
);
}
/**
* {@inheritDoc}
*/
public
function
lastInsertId
(
$name
=
null
)
{
if
(
$name
===
null
)
{
return
parent
::
lastInsertId
(
$name
);
}
Deprecation
::
triggerIfCalledFromOutside
(
'doctrine/dbal'
,
'https://github.com/doctrine/dbal/issues/4687'
,
'The usage of Connection::lastInsertId() with a sequence name is deprecated.'
,
);
$statement
=
$this
->
prepare
(
'SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?'
,
);
$statement
->
bindValue
(
1
,
$name
);
return
$statement
->
execute
()
->
fetchOne
();
}
public
function
getNativeConnection
():
PDO
{
return
$this
->
connection
->
getNativeConnection
();
}
/** @deprecated Call {@see getNativeConnection()} instead. */
public
function
getWrappedConnection
():
PDO
{
Deprecation
::
trigger
(
'doctrine/dbal'
,
'https://github.com/doctrine/dbal/pull/5037'
,
'%s is deprecated, call getNativeConnection() instead.'
,
__METHOD__
,
);
return
$this
->
connection
->
getWrappedConnection
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 13:56 (6 d, 13 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fc/d0/24d6e4b4cb4abf81c2f1b0710bcb
Default Alt Text
Connection.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment