Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104803466
NuanceManagementImportWorkflow.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, Mar 12, 13:00
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Mar 14, 13:00 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24857025
Attached To
rPH Phabricator
NuanceManagementImportWorkflow.php
View Options
<?php
final
class
NuanceManagementImportWorkflow
extends
NuanceManagementWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'import'
)
->
setExamples
(
'**import** [__options__]'
)
->
setSynopsis
(
pht
(
'Import data from a source.'
))
->
setArguments
(
array
(
array
(
'name'
=>
'source'
,
'param'
=>
'source'
,
'help'
=>
pht
(
'Choose which source to import.'
),
),
));
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$source
=
$this
->
loadSource
(
$args
,
'source'
);
$definition
=
$source
->
getDefinition
()
->
setViewer
(
$this
->
getViewer
())
->
setSource
(
$source
);
if
(!
$definition
->
hasImportCursors
())
{
throw
new
PhutilArgumentUsageException
(
pht
(
'This source ("%s") does not expose import cursors.'
,
$source
->
getName
()));
}
$cursors
=
$definition
->
getImportCursors
();
if
(!
$cursors
)
{
throw
new
PhutilArgumentUsageException
(
pht
(
'This source ("%s") does not have any import cursors.'
,
$source
->
getName
()));
}
echo
tsprintf
(
"%s
\n
"
,
pht
(
'OK, but actual importing is not implemented yet.'
));
return
0
;
}
}
Event Timeline
Log In to Comment