Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93942929
DrydockCommandError.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
Mon, Dec 2, 17:26
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 4, 17:26 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22727446
Attached To
rPH Phabricator
DrydockCommandError.php
View Options
<?php
final
class
DrydockCommandError
extends
Phobject
{
private
$phase
;
private
$displayCommand
;
private
$command
;
private
$error
;
private
$stdout
;
private
$stderr
;
public
static
function
newFromCommandException
(
CommandException
$ex
)
{
$error
=
new
self
();
$error
->
command
=
(
string
)
$ex
->
getCommand
();
$error
->
error
=
$ex
->
getError
();
$error
->
stdout
=
$ex
->
getStdout
();
$error
->
stderr
=
$ex
->
getStderr
();
return
$error
;
}
public
function
setPhase
(
$phase
)
{
$this
->
phase
=
$phase
;
return
$this
;
}
public
function
getPhase
()
{
return
$this
->
phase
;
}
public
function
setDisplayCommand
(
$display_command
)
{
$this
->
displayCommand
=
(
string
)
$display_command
;
return
$this
;
}
public
function
getDisplayCommand
()
{
return
$this
->
displayCommand
;
}
public
function
toDictionary
()
{
$display_command
=
$this
->
getDisplayCommand
();
if
(
$display_command
===
null
)
{
$display_command
=
$this
->
command
;
}
return
array
(
'phase'
=>
$this
->
getPhase
(),
'command'
=>
$display_command
,
'raw'
=>
$this
->
command
,
'err'
=>
$this
->
error
,
'stdout'
=>
$this
->
stdout
,
'stderr'
=>
$this
->
stderr
,
);
}
}
Event Timeline
Log In to Comment