class CRM_Utils_ConsoleTee

Capture the output from the console, copy it to a file, and pass it on.

Properties

protected string $fileName
protected resource $fh

Methods

create(string $prefix = 'ConsoleTee-')

Capture console output and copy to a temp file.

__construct(string $fileName)

CRM_Utils_ConsoleTee constructor.

start(string $mode = 'w')

Start capturing console output and copying it to a file.

bool
onOutput(string $buf)

Process a snippet of data from the output buffer.

stop()

Stop capturing console output.

string
getFileName()

No description

Details

at line 50
static CRM_Utils_ConsoleTee create(string $prefix = 'ConsoleTee-')

Capture console output and copy to a temp file.

Parameters

string $prefix

Return Value

CRM_Utils_ConsoleTee

at line 70
__construct(string $fileName)

CRM_Utils_ConsoleTee constructor.

Parameters

string $fileName The full path of the file to write to.

at line 82
CRM_Utils_ConsoleTee start(string $mode = 'w')

Start capturing console output and copying it to a file.

Parameters

string $mode The file output mode, e.g. w or w+.

Return Value

CRM_Utils_ConsoleTee

See also

fopen

at line 95
bool onOutput(string $buf)

Process a snippet of data from the output buffer.

Parameters

string $buf

Return Value

bool

See also

ob_start

at line 105
CRM_Utils_ConsoleTee stop()

Stop capturing console output.

Return Value

CRM_Utils_ConsoleTee

at line 114
string getFileName()

Return Value

string