XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct (Swift_CharacterReaderFactory $factory, $charset) | |
flushContents () | |
importByteStream (Swift_OutputByteStream $os) | |
importString ($string) | |
read ($length) | |
readBytes ($length) | |
setCharacterReaderFactory (Swift_CharacterReaderFactory $factory) | |
setCharacterSet ($charset) | |
setPointer ($charOffset) | |
write ($chars) | |
Private Member Functions | |
_reloadBuffer ($fp, $len) | |
Static Private Member Functions | |
static | _initializeMaps () |
Private Attributes | |
$_array = array() | |
$_array_size = array() | |
$_charReader | |
$_charReaderFactory | |
$_charset | |
$_offset = 0 | |
Static Private Attributes | |
static | $_byteMap |
static | $_charMap |
Definition at line 21 of file ArrayCharacterStream.php.
Swift_CharacterStream_ArrayCharacterStream::__construct | ( | Swift_CharacterReaderFactory | $factory, |
$charset | |||
) |
Create a new CharacterStream with the given $chars, if set.
Swift_CharacterReaderFactory | $factory | for loading validators |
string | $charset | used in the stream |
Definition at line 54 of file ArrayCharacterStream.php.
References setCharacterReaderFactory(), and setCharacterSet().
|
staticprivate |
Definition at line 307 of file ArrayCharacterStream.php.
|
private |
Definition at line 293 of file ArrayCharacterStream.php.
References $i.
Referenced by write().
Swift_CharacterStream_ArrayCharacterStream::flushContents | ( | ) |
Empty the stream and reset the internal pointer.
Implements Swift_CharacterStream.
Definition at line 286 of file ArrayCharacterStream.php.
Referenced by importString().
Swift_CharacterStream_ArrayCharacterStream::importByteStream | ( | Swift_OutputByteStream | $os | ) |
Overwrite this character stream using the byte sequence in the byte stream.
Swift_OutputByteStream | $os | output stream to read from |
Implements Swift_CharacterStream.
Definition at line 86 of file ArrayCharacterStream.php.
References $_array_size, $i, and Swift_OutputByteStream\read().
Swift_CharacterStream_ArrayCharacterStream::importString | ( | $string | ) |
Import a string a bytes into this CharacterStream, overwriting any existing data in the stream.
string | $string |
Implements Swift_CharacterStream.
Definition at line 123 of file ArrayCharacterStream.php.
References flushContents(), and write().
Swift_CharacterStream_ArrayCharacterStream::read | ( | $length | ) |
Read $length characters from the stream and move the internal pointer $length further into the stream.
int | $length |
Implements Swift_CharacterStream.
Definition at line 135 of file ArrayCharacterStream.php.
Swift_CharacterStream_ArrayCharacterStream::readBytes | ( | $length | ) |
Read $length characters from the stream and return a 1-dimensional array containing there octet values.
int | $length |
Implements Swift_CharacterStream.
Definition at line 168 of file ArrayCharacterStream.php.
Swift_CharacterStream_ArrayCharacterStream::setCharacterReaderFactory | ( | Swift_CharacterReaderFactory | $factory | ) |
Set the CharacterReaderFactory for multi charset support.
Swift_CharacterReaderFactory | $factory |
Implements Swift_CharacterStream.
Definition at line 76 of file ArrayCharacterStream.php.
Referenced by __construct().
Swift_CharacterStream_ArrayCharacterStream::setCharacterSet | ( | $charset | ) |
Set the character set used in this CharacterStream.
string | $charset |
Implements Swift_CharacterStream.
Definition at line 66 of file ArrayCharacterStream.php.
Referenced by __construct().
Swift_CharacterStream_ArrayCharacterStream::setPointer | ( | $charOffset | ) |
Move the internal pointer to $charOffset in the stream.
int | $charOffset |
Implements Swift_CharacterStream.
Definition at line 270 of file ArrayCharacterStream.php.
References $_array_size, and elseif().
Swift_CharacterStream_ArrayCharacterStream::write | ( | $chars | ) |
Write $chars to the end of the stream.
string | $chars |
Implements Swift_CharacterStream.
Definition at line 192 of file ArrayCharacterStream.php.
References $_array_size, $i, and _reloadBuffer().
Referenced by importString().
|
private |
Array of characters
Definition at line 41 of file ArrayCharacterStream.php.
|
private |
Size of the array of character
Definition at line 44 of file ArrayCharacterStream.php.
Referenced by importByteStream(), setPointer(), and write().
|
staticprivate |
A map of characters and their derivative byte values
Definition at line 29 of file ArrayCharacterStream.php.
|
staticprivate |
A map of byte values and their respective characters
Definition at line 26 of file ArrayCharacterStream.php.
|
private |
The char reader (lazy-loaded) for the current charset
Definition at line 32 of file ArrayCharacterStream.php.
|
private |
A factory for creatiing CharacterReader instances
Definition at line 35 of file ArrayCharacterStream.php.
|
private |
The character set this stream is using
Definition at line 38 of file ArrayCharacterStream.php.
|
private |
The current character offset in the stream
Definition at line 47 of file ArrayCharacterStream.php.
Referenced by read(), and readBytes().