Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101887730
ConduitAPI_token_Method.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, Feb 14, 18:46
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Feb 16, 18:46 (2 d)
Engine
blob
Format
Raw Data
Handle
24247196
Attached To
rPH Phabricator
ConduitAPI_token_Method.php
View Options
<?php
abstract
class
ConduitAPI_token_Method
extends
ConduitAPIMethod
{
public
function
getApplication
()
{
return
PhabricatorApplication
::
getByClass
(
'PhabricatorApplicationTokens'
);
}
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