Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F971716
PhabricatorSMSManagementSendTestWorkflow.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorSMSManagementSendTestWorkflow.php
View Options
<?php
final
class
PhabricatorSMSManagementSendTestWorkflow
extends
PhabricatorSMSManagementWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'send-test'
)
->
setSynopsis
(
pht
(
'Simulate sending an SMS. This may be useful to test your SMS '
.
'configuration, or while developing new SMS adapters.'
))
->
setExamples
(
"**send-test** --to 12345678 --body 'pizza time yet?'"
)
->
setArguments
(
array
(
array
(
'name'
=>
'to'
,
'param'
=>
'number'
,
'help'
=>
pht
(
'Send SMS "To:" the specified number.'
),
'repeat'
=>
true
,
),
array
(
'name'
=>
'body'
,
'param'
=>
'text'
,
'help'
=>
pht
(
'Send SMS with the specified body.'
),
),
));
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$console
=
PhutilConsole
::
getConsole
();
$viewer
=
$this
->
getViewer
();
$tos
=
$args
->
getArg
(
'to'
);
$body
=
$args
->
getArg
(
'body'
);
PhabricatorWorker
::
setRunAllTasksInProcess
(
true
);
PhabricatorSMSImplementationAdapter
::
sendSMS
(
$tos
,
$body
);
$console
->
writeErr
(
"%s
\n\n
phabricator/ $ ./bin/sms list-outbound
\n\n
"
,
pht
(
'Send completed! You can view the list of SMS messages sent by '
.
'running this command:'
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 5:54 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
224071
Default Alt Text
PhabricatorSMSManagementSendTestWorkflow.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment