Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7434477
FetchUtils.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
FetchUtils.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Doctrine\DBAL\Driver
;
/** @internal */
final
class
FetchUtils
{
/**
* @return mixed|false
*
* @throws Exception
*/
public
static
function
fetchOne
(
Result
$result
)
{
$row
=
$result
->
fetchNumeric
();
if
(
$row
===
false
)
{
return
false
;
}
return
$row
[
0
];
}
/**
* @return list<list<mixed>>
*
* @throws Exception
*/
public
static
function
fetchAllNumeric
(
Result
$result
):
array
{
$rows
=
[];
while
((
$row
=
$result
->
fetchNumeric
())
!==
false
)
{
$rows
[]
=
$row
;
}
return
$rows
;
}
/**
* @return list<array<string,mixed>>
*
* @throws Exception
*/
public
static
function
fetchAllAssociative
(
Result
$result
):
array
{
$rows
=
[];
while
((
$row
=
$result
->
fetchAssociative
())
!==
false
)
{
$rows
[]
=
$row
;
}
return
$rows
;
}
/**
* @return list<mixed>
*
* @throws Exception
*/
public
static
function
fetchFirstColumn
(
Result
$result
):
array
{
$rows
=
[];
while
((
$row
=
$result
->
fetchOne
())
!==
false
)
{
$rows
[]
=
$row
;
}
return
$rows
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 12:27 (1 h, 6 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
40/51/bc4f7cff39bfe48be71285b167d2
Default Alt Text
FetchUtils.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment