Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4152021
ParameterKeyTypeException.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
906 B
Referenced Files
None
Subscribers
None
ParameterKeyTypeException.php
View Options
<?php
namespace
Wikimedia\Assert
;
/**
* Exception indicating that a parameter key type assertion failed.
* This generally means a disagreement between the caller and the implementation of a function.
*
* @since 0.3.0
*
* @license MIT
* @author Daniel Kinzler
* @author Thiemo Kreuz
* @copyright Wikimedia Deutschland e.V.
*/
class
ParameterKeyTypeException
extends
ParameterAssertionException
{
/**
* @var string
*/
private
$type
;
/**
* @param string $parameterName
* @param string $type
*
* @throws ParameterTypeException
*/
public
function
__construct
(
$parameterName
,
$type
)
{
if
(
!
is_string
(
$type
)
)
{
throw
new
ParameterTypeException
(
'type'
,
'string'
);
}
parent
::
__construct
(
$parameterName
,
"all elements must have $type keys"
);
$this
->
type
=
$type
;
}
/**
* @return string
*/
public
function
getType
():
string
{
return
$this
->
type
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 20:11 (7 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
02/f3/4c30d7a07029cc37e6720763df99
Default Alt Text
ParameterKeyTypeException.php (906 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment