Page Menu
Home
WMGMC Issues
搜索
Configure Global Search
登录
Files
F15848
ArcanistPromptsConfigOption.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
订阅
标记用于日后
授予令牌
Size
1 KB
Referenced Files
None
订阅者
None
ArcanistPromptsConfigOption.php
View Options
<?php
final
class
ArcanistPromptsConfigOption
extends
ArcanistMultiSourceConfigOption
{
public
function
getType
()
{
return
'map<string, prompt>'
;
}
public
function
getValueFromStorageValue
(
$value
)
{
if
(!
is_array
(
$value
))
{
throw
new
Exception
(
pht
(
'Expected a list!'
));
}
if
(!
phutil_is_natural_list
(
$value
))
{
throw
new
Exception
(
pht
(
'Expected a natural list!'
));
}
$responses
=
array
();
foreach
(
$value
as
$spec
)
{
$responses
[]
=
ArcanistPromptResponse
::
newFromConfig
(
$spec
);
}
return
$responses
;
}
protected
function
didReadStorageValueList
(
array
$list
)
{
assert_instances_of
(
$list
,
'ArcanistConfigurationSourceValue'
);
$results
=
array
();
foreach
(
$list
as
$spec
)
{
$source
=
$spec
->
getConfigurationSource
();
$value
=
$spec
->
getValue
();
$value
->
setConfigurationSource
(
$source
);
$results
[]
=
$value
;
}
return
$results
;
}
public
function
getDisplayValueFromValue
(
$value
)
{
return
pht
(
'Use the "prompts" workflow to review prompt responses.'
);
}
public
function
getStorageValueFromValue
(
$value
)
{
return
mpull
(
$value
,
'getStorageDictionary'
);
}
}
File Metadata
详情
附加的
Mime Type
text/x-php
Expires
9月 9 Tue, 5:43 AM (3 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5338
默认替代文本
ArcanistPromptsConfigOption.php (1 KB)
Attached To
Mode
rP phorge
附加的
Detach File
Event Timeline
Log In to Comment