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