Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92598830
PhutilHelpArgumentWorkflow.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
Thu, Nov 21, 21:08
Size
999 B
Mime Type
text/x-php
Expires
Sat, Nov 23, 21:08 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22466390
Attached To
rPHU libphutil
PhutilHelpArgumentWorkflow.php
View Options
<?php
/**
* @group console
*/
final
class
PhutilHelpArgumentWorkflow
extends
PhutilArgumentWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'help'
);
$this
->
setExamples
(
<<<EOHELP
**help** [__command__]
EOHELP
);
$this
->
setSynopsis
(
<<<EOHELP
Show this help, or workflow help for __command__.
EOHELP
);
$this
->
setArguments
(
array
(
array
(
'name'
=>
'help-with-what'
,
'wildcard'
=>
true
,
)));
}
public
function
isExecutable
()
{
return
true
;
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$with
=
$args
->
getArg
(
'help-with-what'
);
if
(!
$with
)
{
$args
->
printHelpAndExit
();
}
else
{
foreach
(
$with
as
$thing
)
{
echo
phutil_console_format
(
"**%s WORKFLOW**
\n\n
"
,
strtoupper
(
$thing
));
echo
$args
->
renderWorkflowHelp
(
$thing
,
$show_flags
=
true
);
echo
"
\n
"
;
}
exit
(
PhutilArgumentParser
::
PARSE_ERROR_CODE
);
}
}
}
Event Timeline
Log In to Comment