Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82856081
ConduitEpochParameterType.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
Fri, Sep 13, 20:19
Size
783 B
Mime Type
text/x-php
Expires
Sun, Sep 15, 20:19 (2 d)
Engine
blob
Format
Raw Data
Handle
20762064
Attached To
rPH Phabricator
ConduitEpochParameterType.php
View Options
<?php
final
class
ConduitEpochParameterType
extends
ConduitParameterType
{
protected
function
getParameterValue
(
array
$request
,
$key
,
$strict
)
{
$value
=
parent
::
getParameterValue
(
$request
,
$key
,
$strict
);
$value
=
$this
->
parseIntValue
(
$request
,
$key
,
$value
,
$strict
);
if
(
$value
<=
0
)
{
$this
->
raiseValidationException
(
$request
,
$key
,
pht
(
'Epoch timestamp must be larger than 0, got %d.'
,
$value
));
}
return
$value
;
}
protected
function
getParameterTypeName
()
{
return
'epoch'
;
}
protected
function
getParameterFormatDescriptions
()
{
return
array
(
pht
(
'Epoch timestamp, as an integer.'
),
);
}
protected
function
getParameterExamples
()
{
return
array
(
'1450019509'
,
);
}
}
Event Timeline
Log In to Comment