Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2893797
HarbormasterExecFuture.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
HarbormasterExecFuture.php
View Options
<?php
final
class
HarbormasterExecFuture
extends
Future
{
private
$future
;
private
$stdout
;
private
$stderr
;
public
function
setFuture
(
ExecFuture
$future
)
{
$this
->
future
=
$future
;
return
$this
;
}
public
function
getFuture
(
)
{
return
$this
->
future
;
}
public
function
setLogs
(
HarbormasterBuildLog
$stdout
,
HarbormasterBuildLog
$stderr
)
{
$this
->
stdout
=
$stdout
;
$this
->
stderr
=
$stderr
;
return
$this
;
}
public
function
isReady
(
)
{
if
(
$this
->
hasResult
(
)
)
{
return
true
;
}
$future
=
$this
->
getFuture
(
)
;
$is_ready
=
$future
->
isReady
(
)
;
list
(
$stdout
,
$stderr
)
=
$future
->
read
(
)
;
$future
->
discardBuffers
(
)
;
if
(
$this
->
stdout
)
{
$this
->
stdout
->
append
(
$stdout
)
;
}
if
(
$this
->
stderr
)
{
$this
->
stderr
->
append
(
$stderr
)
;
}
if
(
$future
->
hasResult
(
)
)
{
$this
->
setResult
(
$future
->
getResult
(
)
)
;
}
// TODO: This should probably be implemented as a FutureProxy; it will
// not currently propagate exceptions or sockets properly.
return
$is_ready
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 19:04 (5 w, 8 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127672
Default Alt Text
HarbormasterExecFuture.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment