Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
progress_trace_buffer Class Reference

Special type of trace that can be used for catching of output of other traces. More...

Inheritance diagram for progress_trace_buffer:
progress_trace

Public Member Functions

 __construct (progress_trace $trace, $passthrough=true)
 Constructor. More...
 
 finished ()
 Called when the processing is finished.
 
 get_buffer ()
 Return internal text buffer. More...
 
 output ($message, $depth=0)
 Output the trace message. More...
 
 reset_buffer ()
 Reset internal text buffer.
 

Protected Attributes

string $buffer
 output buffer
 
bool $passthrough
 do we pass output out
 
progres_trace $trace
 

Detailed Description

Special type of trace that can be used for catching of output of other traces.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

progress_trace_buffer::__construct ( progress_trace  $trace,
  $passthrough = true 
)

Constructor.

Parameters
progress_trace$trace
bool$passthroughtrue means output and buffer, false means just buffer and no output

Member Function Documentation

◆ get_buffer()

progress_trace_buffer::get_buffer ( )

Return internal text buffer.

Return values
stringbuffered plain text

◆ output()

progress_trace_buffer::output (   $message,
  $depth = 0 
)

Output the trace message.

Parameters
string$messagethe message to output.
int$depthindent depth for this message.
Return values
voidoutput stored in buffer

Reimplemented from progress_trace.


The documentation for this class was generated from the following file: