Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7469628
ParameterTypeMap.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
ParameterTypeMap.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Doctrine\DBAL\Driver\PDO
;
use
Doctrine\DBAL\Driver\Exception\UnknownParameterType
;
use
Doctrine\DBAL\ParameterType
;
use
PDO
;
/** @internal */
final
class
ParameterTypeMap
{
private
const
PARAM_TYPE_MAP
=
[
ParameterType
::
NULL
=>
PDO
::
PARAM_NULL
,
ParameterType
::
INTEGER
=>
PDO
::
PARAM_INT
,
ParameterType
::
STRING
=>
PDO
::
PARAM_STR
,
ParameterType
::
ASCII
=>
PDO
::
PARAM_STR
,
ParameterType
::
BINARY
=>
PDO
::
PARAM_LOB
,
ParameterType
::
LARGE_OBJECT
=>
PDO
::
PARAM_LOB
,
ParameterType
::
BOOLEAN
=>
PDO
::
PARAM_BOOL
,
];
/**
* Converts DBAL parameter type to PDO parameter type
*
* @psalm-return PDO::PARAM_*
*
* @throws UnknownParameterType
*
* @psalm-assert ParameterType::* $type
*/
public
static
function
convertParamType
(
int
$type
):
int
{
if
(!
isset
(
self
::
PARAM_TYPE_MAP
[
$type
]))
{
throw
UnknownParameterType
::
new
(
$type
);
}
return
self
::
PARAM_TYPE_MAP
[
$type
];
}
private
function
__construct
()
{
}
private
function
__clone
()
{
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 07:07 (4 d, 2 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4b/1b/6902a987d0302073e3d69971f104
Default Alt Text
ParameterTypeMap.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment