Horde_Stream_TempString
extends Horde_Stream_Temp
in package
Implementation of Horde_Stream that uses a PHP native string variable until a certain size is reached, at which point it converts storage to a PHP temporary stream.
NOTE: Do NOT use this class if it's possible that a stream_filter will need to be added to the stream by some client code. If the size of the data does not exceed max_memory there will be no stream to attach to.
Tags
Table of Contents
- $stream : resource
- Stream resource.
- $use_stream : bool
- $utf8_char : bool
- $_params : array<string|int, mixed>
- Configuration parameters.
- $_string : Horde_Stream_String
- String stream object.
- $_utf8_char : bool
- Parse character as UTF-8 data instead of single byte.
- __clone() : mixed
- __construct() : mixed
- Constructor.
- __get() : mixed
- __serialize() : array<string|int, mixed>
- __set() : mixed
- __toString() : mixed
- __unserialize() : void
- add() : mixed
- close() : mixed
- Close the stream.
- end() : mixed
- eof() : mixed
- getChar() : mixed
- getEOL() : string
- Auto-determine the EOL string.
- getString() : mixed
- getToChar() : mixed
- length() : mixed
- peek() : mixed
- pos() : mixed
- rewind() : mixed
- search() : mixed
- seek() : mixed
- serialize() : mixed
- substring() : mixed
- unserialize() : mixed
- _init() : mixed
- Initialization method.
Properties
$stream
Stream resource.
public
resource
$stream
$use_stream read-only
public
bool
$use_stream
If true, the object is using a PHP temp stream internally.
$utf8_char
public
bool
$utf8_char
Parse character as UTF-8 data instead of single byte (@since 1.4.0).
$_params
Configuration parameters.
protected
array<string|int, mixed>
$_params
$_string
String stream object.
protected
Horde_Stream_String
$_string
$_utf8_char
Parse character as UTF-8 data instead of single byte.
protected
bool
$_utf8_char
= \false
Methods
__clone()
public
__clone() : mixed
Return values
mixed —__construct()
Constructor.
public
__construct([array<string|int, mixed> $opts = array() ]) : mixed
Parameters
- $opts : array<string|int, mixed> = array()
-
Additional configuration options:
- max_memory: (integer) The maximum amount of memory to allocate to the PHP temporary stream.
Return values
mixed —__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —__set()
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —__unserialize()
public
__unserialize(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
Return values
void —add()
public
add(mixed $data[, mixed $reset = false ]) : mixed
Parameters
- $data : mixed
- $reset : mixed = false
Return values
mixed —close()
Close the stream.
public
close() : mixed
Tags
Return values
mixed —end()
public
end(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —eof()
public
eof() : mixed
Return values
mixed —getChar()
public
getChar() : mixed
Return values
mixed —getEOL()
Auto-determine the EOL string.
public
getEOL() : string
Tags
Return values
string —The EOL string, or null if no EOL found.
getString()
public
getString([mixed $start = null ][, mixed $end = null ]) : mixed
Parameters
- $start : mixed = null
- $end : mixed = null
Return values
mixed —getToChar()
public
getToChar(mixed $end[, mixed $all = true ]) : mixed
Parameters
- $end : mixed
- $all : mixed = true
Return values
mixed —length()
public
length([mixed $utf8 = false ]) : mixed
Parameters
- $utf8 : mixed = false
Return values
mixed —peek()
public
peek([mixed $length = 1 ]) : mixed
Parameters
- $length : mixed = 1
Return values
mixed —pos()
public
pos() : mixed
Return values
mixed —rewind()
public
rewind() : mixed
Return values
mixed —search()
public
search(mixed $char[, mixed $reverse = false ][, mixed $reset = true ]) : mixed
Parameters
- $char : mixed
- $reverse : mixed = false
- $reset : mixed = true
Return values
mixed —seek()
public
seek(mixed $offset[, mixed $curr = true ][, mixed $char = false ]) : mixed
Parameters
- $offset : mixed
- $curr : mixed = true
- $char : mixed = false
Return values
mixed —serialize()
public
serialize() : mixed
Return values
mixed —substring()
public
substring(mixed $start[, mixed $length = null ][, mixed $char = false ]) : mixed
Parameters
- $start : mixed
- $length : mixed = null
- $char : mixed = false
Return values
mixed —unserialize()
public
unserialize(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —_init()
Initialization method.
protected
_init() : mixed