Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/PhutilDaemon.php
Show First 20 Lines • Show All 289 Lines • ▼ Show 20 Lines | private function beginStdoutCapture() { | ||||
ob_start(array($this, 'didReceiveStdout'), 2); | ob_start(array($this, 'didReceiveStdout'), 2); | ||||
} | } | ||||
private function endStdoutCapture() { | private function endStdoutCapture() { | ||||
ob_end_flush(); | ob_end_flush(); | ||||
} | } | ||||
public function didReceiveStdout($data) { | public function didReceiveStdout($data) { | ||||
if (!strlen($data)) { | if (!phutil_nonempty_string($data)) { | ||||
return ''; | return ''; | ||||
} | } | ||||
return $this->encodeOverseerMessage(self::MESSAGETYPE_STDOUT, $data); | return $this->encodeOverseerMessage(self::MESSAGETYPE_STDOUT, $data); | ||||
} | } | ||||
private function encodeOverseerMessage($type, $data) { | private function encodeOverseerMessage($type, $data) { | ||||
$structure = array($type); | $structure = array($type); | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0