Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77174103
AphrontUserListHTTPParameterType.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
Mon, Aug 12, 22:02
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Aug 14, 22:02 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19835758
Attached To
rPH Phabricator
AphrontUserListHTTPParameterType.php
View Options
<?php
final
class
AphrontUserListHTTPParameterType
extends
AphrontHTTPParameterType
{
protected
function
getParameterValue
(
AphrontRequest
$request
,
$key
)
{
$type
=
new
AphrontStringListHTTPParameterType
();
$list
=
$this
->
getValueWithType
(
$type
,
$request
,
$key
);
return
id
(
new
PhabricatorUserPHIDResolver
())
->
setViewer
(
$this
->
getViewer
())
->
resolvePHIDs
(
$list
);
}
protected
function
getParameterTypeName
()
{
return
'list<user>'
;
}
protected
function
getParameterFormatDescriptions
()
{
return
array
(
pht
(
'Comma-separated list of user PHIDs.'
),
pht
(
'List of user PHIDs, as array.'
),
pht
(
'Comma-separated list of usernames.'
),
pht
(
'List of usernames, as array.'
),
pht
(
'Mixture of usernames and PHIDs.'
),
);
}
protected
function
getParameterExamples
()
{
return
array
(
'v=PHID-USER-1111'
,
'v=PHID-USER-1111,PHID-USER-2222'
,
'v=username'
,
'v=alincoln,htaft'
,
'v[]=PHID-USER-1111&v[]=PHID-USER-2222'
,
'v[]=htaft&v[]=alincoln'
,
'v=PHID-USER-1111,alincoln'
,
'v[]=PHID-USER-1111&v[]=htaft'
,
);
}
}
Event Timeline
Log In to Comment