Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F76079831
ConduitStringParameterType.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Aug 6, 02:55
Size
664 B
Mime Type
text/x-php
Expires
Thu, Aug 8, 02:55 (2 d)
Engine
blob
Format
Raw Data
Handle
19660218
Attached To
rPH Phabricator
ConduitStringParameterType.php
View Options
<?php
final
class
ConduitStringParameterType
extends
ConduitParameterType
{
protected
function
getParameterValue
(
array
$request
,
$key
)
{
$value
=
parent
::
getParameterValue
(
$request
,
$key
);
if
(!
is_string
(
$value
))
{
$this
->
raiseValidationException
(
$request
,
$key
,
pht
(
'Expected string, got something else.'
));
}
return
$value
;
}
protected
function
getParameterTypeName
()
{
return
'string'
;
}
protected
function
getParameterFormatDescriptions
()
{
return
array
(
pht
(
'A string.'
),
);
}
protected
function
getParameterExamples
()
{
return
array
(
'"papaya"'
,
);
}
}
Event Timeline
Log In to Comment