Public Member Functions | |
| __construct ($callback=NULL) | |
| Constructor. | |
| addCallback ($callback) | |
| Adds another callback to be executed when the buffer is flushed. | |
| get () | |
| Captures the output and returns the generated string. | |
| flush () | |
| Flushes the output to stdout (to the browser in most cases). | |
| cancel () | |
| Flushes buffer and throws away captured string. | |
| pause () | |
| resume ($recursive=true) | |
| callback ($output) | |
| The callback that will be invoked by PHP when buffer is flushed. | |
Static Public Member Functions | |
| static | getInnerMostBuffer () |
| static | getOuterMostBuffer () |
| static | bypassAll ($output, $flush=true) |
Public Attributes | |
| const | STATE_BUFFERING = 1 |
| The output buffer is capturing output. | |
| const | STATE_PAUSED = 2 |
| The output buffer has not been flushed, but is not capturing output. | |
| const | STATE_FINISHED = 4 |
| The buffer content has been retrieved. | |
| const | STATE_CANCELLED = 8 |
| The buffer content has been discarded. | |
Static Protected Attributes | |
| static | $rootBuffer = NULL |
| The outer-most buffer. | |
Private Member Functions | |
| getPreviousBuffer () | |
Private Attributes | |
| $lastObLevel | |
| Height of the output buffer stack at the time of object construction. | |
| $callbacks = array() | |
| Registered callbacks that will be executed when the buffer is flushed. | |
| $state = 1 | |
| The current state of this buffer. | |
| $byPassedOutput = NULL | |
| Output that has been captured before being paused. | |
| $nextBuffer = NULL | |
Definition at line 7 of file OutputBuffer.class.php.
| spunQ_OutputBuffer::__construct | ( | $ | callback = NULL |
) |
Constructor.
Takes any number of arguments, which will be treated just like the description of the first parameter suggests.
| $callback | A callback to be executed when the buffer is flushed. Might be any value spunQ_Callback::call() accepts. |
Definition at line 104 of file OutputBuffer.class.php.
| spunQ_OutputBuffer::addCallback | ( | $ | callback | ) |
Adds another callback to be executed when the buffer is flushed.
| $callback | A callback to be executed when the buffer is flushed. Might be any value spunQ_Callback::call() accepts. |
Definition at line 133 of file OutputBuffer.class.php.
| spunQ_OutputBuffer::callback | ( | $ | output | ) |
The callback that will be invoked by PHP when buffer is flushed.
This function is not intended to be called by the developer, it has to be public for technical reasons.
| $output | The output that has been captured so far. |
Definition at line 314 of file OutputBuffer.class.php.
| spunQ_OutputBuffer::cancel | ( | ) |
Flushes buffer and throws away captured string.
Definition at line 208 of file OutputBuffer.class.php.
| spunQ_OutputBuffer::flush | ( | ) |
Flushes the output to stdout (to the browser in most cases).
Definition at line 175 of file OutputBuffer.class.php.
| spunQ_OutputBuffer::get | ( | ) |
Captures the output and returns the generated string.
Definition at line 142 of file OutputBuffer.class.php.
spunQ_OutputBuffer::$byPassedOutput = NULL [private] |
Output that has been captured before being paused.
Definition at line 93 of file OutputBuffer.class.php.
spunQ_OutputBuffer::$callbacks = array() [private] |
Registered callbacks that will be executed when the buffer is flushed.
Definition at line 79 of file OutputBuffer.class.php.
spunQ_OutputBuffer::$lastObLevel [private] |
Height of the output buffer stack at the time of object construction.
The constructor will set this value to ob_get_level().
Definition at line 72 of file OutputBuffer.class.php.
spunQ_OutputBuffer::$rootBuffer = NULL [static, protected] |
The outer-most buffer.
NULL if no buffer has been created yet. Definition at line 34 of file OutputBuffer.class.php.
spunQ_OutputBuffer::$state = 1 [private] |
The current state of this buffer.
Either of the STATE_* constants.
Definition at line 86 of file OutputBuffer.class.php.
1.5.9