Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F72192248
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, Jul 15, 05:53
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Jul 17, 05:53 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
19038691
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