C# Класс Pchp.Library.Output

PHP output control functions implementation.
Показать файл Открыть проект

Открытые методы

Метод Описание
flush ( Context ctx ) : void

Flush the output buffer of the HTTP server. Has no effect on data buffered in output buffers. No value is returned.

ob_clean ( Context ctx ) : void

Discards the contents of the current level of buffering. No value is returned.

ob_end_clean ( Context ctx ) : bool

Discards the contents of the current level of buffering and decreases the level.

ob_end_flush ( Context ctx ) : bool

Flushes the contents of the current level of buffering and decreases the level.

ob_flush ( Context ctx ) : void

Flushes data from the current level of buffering to the previous one or to the client if the current one is the first one. Applies the filter assigned to the current level (if any). No value is returned.

ob_get_clean ( Context ctx ) : PhpValue

Gets the contents of the current buffer and cleans it.

ob_get_contents ( Context ctx ) : PhpValue

Gets the content of the current buffer.

ob_get_flush ( Context ctx ) : PhpValue

Gets the content of the current buffer and decreases the level of buffering.

ob_get_length ( Context ctx ) : PhpValue

Retrieves the length of the output buffer.

ob_get_level ( Context ctx ) : int

Retrieves the level of buffering.

ob_get_status ( Context ctx ) : PhpArray

Get the status of the current or all output buffers.

ob_get_status ( Context ctx, bool full ) : PhpArray

Get the status of the current or all output buffers.

ob_gzhandler ( Context ctx, PhpValue data, int mode ) : PhpValue

Compresses data by gzip compression.

The function does not support subsequent calls to compress more chunks of data subsequentally.

ob_implicit_flush ( Context ctx ) : void

Switches implicit flushing on. No value is returned.

Affects the current script context.

ob_implicit_flush ( Context ctx, bool doFlush ) : void

Switches implicit flushing on or off. No value is returned.

Affects the current script context. There is a bug in the PHP implementation of this function: "Turning implicit flushing on will disable output buffering, the output buffers current output will be sent as if ob_end_flush() had been called." Actually, this is not true (PHP doesn't do that) and in fact it is nonsense because ob_end_flush only flushes and destroys one level of buffering. It would be more meaningful if ob_implicit_flush function had flushed and destroyed all existing buffers and so disabled output buffering.

ob_list_handlers ( Context ctx ) : PhpArray
ob_start ( Context ctx, Delegate filter = null, int chunkSize, bool erase = true ) : bool

Increases the level of buffering, enables output buffering if disabled and assignes the filtering callback to the new level of buffering.

printf ( Context ctx, string format ) : int

Generates output according to the specified formatting string.

vprintf ( Context ctx, string format, PhpArray args ) : int

Generates output according to the specified formatting string.

Приватные методы

Метод Описание
EndInternal ( Context ctx, bool flush ) : bool

Decreases the level of buffering and discards or flushes data on the current level of buffering.

GetLevelStatus ( BufferedOutput bo, int index ) : PhpArray

Описание методов

flush() публичный статический Метод

Flush the output buffer of the HTTP server. Has no effect on data buffered in output buffers. No value is returned.
public static flush ( Context ctx ) : void
ctx Pchp.Core.Context
Результат void

ob_clean() публичный статический Метод

Discards the contents of the current level of buffering. No value is returned.
public static ob_clean ( Context ctx ) : void
ctx Pchp.Core.Context
Результат void

ob_end_clean() публичный статический Метод

Discards the contents of the current level of buffering and decreases the level.
public static ob_end_clean ( Context ctx ) : bool
ctx Pchp.Core.Context
Результат bool

ob_end_flush() публичный статический Метод

Flushes the contents of the current level of buffering and decreases the level.
public static ob_end_flush ( Context ctx ) : bool
ctx Pchp.Core.Context
Результат bool

ob_flush() публичный статический Метод

Flushes data from the current level of buffering to the previous one or to the client if the current one is the first one. Applies the filter assigned to the current level (if any). No value is returned.
public static ob_flush ( Context ctx ) : void
ctx Pchp.Core.Context
Результат void

ob_get_clean() публичный статический Метод

Gets the contents of the current buffer and cleans it.
public static ob_get_clean ( Context ctx ) : PhpValue
ctx Pchp.Core.Context
Результат Pchp.Core.PhpValue

ob_get_contents() публичный статический Метод

Gets the content of the current buffer.
public static ob_get_contents ( Context ctx ) : PhpValue
ctx Pchp.Core.Context
Результат Pchp.Core.PhpValue

ob_get_flush() публичный статический Метод

Gets the content of the current buffer and decreases the level of buffering.
public static ob_get_flush ( Context ctx ) : PhpValue
ctx Pchp.Core.Context
Результат Pchp.Core.PhpValue

ob_get_length() публичный статический Метод

Retrieves the length of the output buffer.
public static ob_get_length ( Context ctx ) : PhpValue
ctx Pchp.Core.Context
Результат Pchp.Core.PhpValue

ob_get_level() публичный статический Метод

Retrieves the level of buffering.
public static ob_get_level ( Context ctx ) : int
ctx Pchp.Core.Context
Результат int

ob_get_status() публичный статический Метод

Get the status of the current or all output buffers.
public static ob_get_status ( Context ctx ) : PhpArray
ctx Pchp.Core.Context
Результат Pchp.Core.PhpArray

ob_get_status() публичный статический Метод

Get the status of the current or all output buffers.
public static ob_get_status ( Context ctx, bool full ) : PhpArray
ctx Pchp.Core.Context Current runtime context.
full bool Whether to retrieve extended information about all levels of buffering or about the current one.
Результат Pchp.Core.PhpArray

ob_gzhandler() публичный статический Метод

Compresses data by gzip compression.
The function does not support subsequent calls to compress more chunks of data subsequentally.
public static ob_gzhandler ( Context ctx, PhpValue data, int mode ) : PhpValue
ctx Pchp.Core.Context Current runtime context.
data Pchp.Core.PhpValue Data to be compressed.
mode int Compression mode.
Результат Pchp.Core.PhpValue

ob_implicit_flush() публичный статический Метод

Switches implicit flushing on. No value is returned.
Affects the current script context.
public static ob_implicit_flush ( Context ctx ) : void
ctx Pchp.Core.Context
Результат void

ob_implicit_flush() публичный статический Метод

Switches implicit flushing on or off. No value is returned.
Affects the current script context. There is a bug in the PHP implementation of this function: "Turning implicit flushing on will disable output buffering, the output buffers current output will be sent as if ob_end_flush() had been called." Actually, this is not true (PHP doesn't do that) and in fact it is nonsense because ob_end_flush only flushes and destroys one level of buffering. It would be more meaningful if ob_implicit_flush function had flushed and destroyed all existing buffers and so disabled output buffering.
public static ob_implicit_flush ( Context ctx, bool doFlush ) : void
ctx Pchp.Core.Context Current runtime context.
doFlush bool Do flush implicitly?
Результат void

ob_list_handlers() публичный статический Метод

public static ob_list_handlers ( Context ctx ) : PhpArray
ctx Pchp.Core.Context
Результат Pchp.Core.PhpArray

ob_start() публичный статический Метод

Increases the level of buffering, enables output buffering if disabled and assignes the filtering callback to the new level of buffering.
public static ob_start ( Context ctx, Delegate filter = null, int chunkSize, bool erase = true ) : bool
ctx Pchp.Core.Context Current runtime context.
filter System.Delegate The filtering callback. Ignores invalid callbacks.
chunkSize int Not supported.
erase bool Not supported.
Результат bool

printf() публичный статический Метод

Generates output according to the specified formatting string.
public static printf ( Context ctx, string format ) : int
ctx Pchp.Core.Context Current runtime context.
format string The formatting string. See also the sprintf function ().
Результат int

vprintf() публичный статический Метод

Generates output according to the specified formatting string.
public static vprintf ( Context ctx, string format, PhpArray args ) : int
ctx Pchp.Core.Context Current runtime context.
format string The formatting string.
args Pchp.Core.PhpArray Array of variables to format.
Результат int