Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95732928
TokenConduitAPIMethod.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
Wed, Dec 18, 18:48
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Dec 20, 18:48 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
23049330
Attached To
rPH Phabricator
TokenConduitAPIMethod.php
View Options
<?php
abstract
class
TokenConduitAPIMethod
extends
ConduitAPIMethod
{
final
public
function
getApplication
()
{
return
PhabricatorApplication
::
getByClass
(
'PhabricatorTokensApplication'
);
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_UNSTABLE
;
}
public
function
buildTokenDicts
(
array
$tokens
)
{
assert_instances_of
(
$tokens
,
'PhabricatorToken'
);
$list
=
array
();
foreach
(
$tokens
as
$token
)
{
$list
[]
=
array
(
'id'
=>
$token
->
getID
(),
'name'
=>
$token
->
getName
(),
'phid'
=>
$token
->
getPHID
(),
);
}
return
$list
;
}
public
function
buildTokenGivenDicts
(
array
$tokens_given
)
{
assert_instances_of
(
$tokens_given
,
'PhabricatorTokenGiven'
);
$list
=
array
();
foreach
(
$tokens_given
as
$given
)
{
$list
[]
=
array
(
'authorPHID'
=>
$given
->
getAuthorPHID
(),
'objectPHID'
=>
$given
->
getObjectPHID
(),
'tokenPHID'
=>
$given
->
getTokenPHID
(),
'dateCreated'
=>
$given
->
getDateCreated
(),
);
}
return
$list
;
}
}
Event Timeline
Log In to Comment