Page Menu
Home
WMGMC Issues
搜索
Configure Global Search
登录
Files
F15961
ArcanistWorkflowArgument.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
订阅
标记用于日后
授予令牌
Size
2 KB
Referenced Files
None
订阅者
None
ArcanistWorkflowArgument.php
View Options
<?php
final
class
ArcanistWorkflowArgument
extends
Phobject
{
private
$key
;
private
$help
;
private
$wildcard
;
private
$parameter
;
private
$isPathArgument
;
private
$shortFlag
;
private
$repeatable
;
private
$relatedConfig
=
array
();
public
function
setKey
(
$key
)
{
$this
->
key
=
$key
;
return
$this
;
}
public
function
getKey
()
{
return
$this
->
key
;
}
public
function
setWildcard
(
$wildcard
)
{
$this
->
wildcard
=
$wildcard
;
return
$this
;
}
public
function
getWildcard
()
{
return
$this
->
wildcard
;
}
public
function
setShortFlag
(
$short_flag
)
{
$this
->
shortFlag
=
$short_flag
;
return
$this
;
}
public
function
getShortFlag
()
{
return
$this
->
shortFlag
;
}
public
function
setRepeatable
(
$repeatable
)
{
$this
->
repeatable
=
$repeatable
;
return
$this
;
}
public
function
getRepeatable
()
{
return
$this
->
repeatable
;
}
public
function
addRelatedConfig
(
$related_config
)
{
$this
->
relatedConfig
[]
=
$related_config
;
return
$this
;
}
public
function
getRelatedConfig
()
{
return
$this
->
relatedConfig
;
}
public
function
getPhutilSpecification
()
{
$spec
=
array
(
'name'
=>
$this
->
getKey
(),
);
if
(
$this
->
getWildcard
())
{
$spec
[
'wildcard'
]
=
true
;
}
$parameter
=
$this
->
getParameter
();
if
(
$parameter
!==
null
)
{
$spec
[
'param'
]
=
$parameter
;
}
$help
=
$this
->
getHelp
();
if
(
$help
!==
null
)
{
$config
=
$this
->
getRelatedConfig
();
if
(
$config
)
{
$more
=
array
();
foreach
(
$this
->
getRelatedConfig
()
as
$config
)
{
$more
[]
=
tsprintf
(
'%s **%s**'
,
pht
(
'Related configuration:'
),
$config
);
}
$more
=
phutil_glue
(
$more
,
"
\n
"
);
$help
=
tsprintf
(
"%B
\n\n
%B"
,
$help
,
$more
);
}
$spec
[
'help'
]
=
$help
;
}
$short
=
$this
->
getShortFlag
();
if
(
$short
!==
null
)
{
$spec
[
'short'
]
=
$short
;
}
$repeatable
=
$this
->
getRepeatable
();
if
(
$repeatable
!==
null
)
{
$spec
[
'repeat'
]
=
$repeatable
;
}
return
$spec
;
}
public
function
setHelp
(
$help
)
{
if
(
is_array
(
$help
))
{
$help
=
implode
(
"
\n\n
"
,
$help
);
}
$this
->
help
=
$help
;
return
$this
;
}
public
function
getHelp
()
{
return
$this
->
help
;
}
public
function
setParameter
(
$parameter
)
{
$this
->
parameter
=
$parameter
;
return
$this
;
}
public
function
getParameter
()
{
return
$this
->
parameter
;
}
public
function
setIsPathArgument
(
$is_path_argument
)
{
$this
->
isPathArgument
=
$is_path_argument
;
return
$this
;
}
public
function
getIsPathArgument
()
{
return
$this
->
isPathArgument
;
}
}
File Metadata
详情
附加的
Mime Type
text/x-php
Expires
9月 9 Tue, 6:04 AM (11 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5438
默认替代文本
ArcanistWorkflowArgument.php (2 KB)
Attached To
Mode
rP phorge
附加的
Detach File
Event Timeline
Log In to Comment