static void __set_state(
array
$properties
)
|
|
Magic PHP5 method.
Magic PHP5 method.
Allows object importing from var_export().
Parameters:
|
array |
$properties: |
List of object properties. |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
OTS_Buffer __construct(
[string
$buffer = '']
)
|
|
Initializes new buffered reader.
Initializes new buffered reader.
Parameters:
|
string |
$buffer: |
Buffer content. |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
void check(
[int
$size = 1]
)
|
|
Checks stream end state.
Checks stream end state.
Parameters:
|
int |
$size: |
Amount of bytes that are going to be read. |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of stream. |
| Since: | 0.1.2 |
Returs properties stream.
Returs properties stream.
API Tags:
| Return: | Properties stream. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
Returns single byte.
Returns single byte.
API Tags:
| Return: | Byte (char) value. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of stream. |
| Since: | 0.1.2 |
Returns quater byte.
Returns quater byte.
API Tags:
| Return: | Double word (long) value. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of stream. |
| Since: | 0.1.2 |
Returns current read position.
Returns current read position.
API Tags:
| Return: | Read position. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
Returns double byte.
Returns double byte.
API Tags:
| Return: | Word (short) value. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of stream. |
| Since: | 0.1.2 |
Returns buffer size.
Returns buffer size.
API Tags:
| Return: | Buffer length. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
string getString(
[int|bool
$length = false]
)
|
|
Returns string from buffer.
Returns string from buffer.
If length is not given then treats first short value from current buffer as string length.
Parameters:
|
int|bool |
$length: |
String length. |
API Tags:
| Return: | First substring. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of stream. |
| Since: | 0.1.2 |
Checks if there is anything left in stream.
Checks if there is anything left in stream.
API Tags:
| Return: | False if pointer is at the end of stream. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
void putChar(
int
$char
)
|
|
Appends single byte to buffer.
Appends single byte to buffer.
Parameters:
|
int |
$char: |
Byte (char) value. |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
void putLong(
int
$long
)
|
|
Appends quater byte to buffer.
Appends quater byte to buffer.
Parameters:
|
int |
$long: |
Double word (long) value. |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
void putShort(
int
$short
)
|
|
Appends double byte to buffer.
Appends double byte to buffer.
Parameters:
|
int |
$short: |
Word (short) value. |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
void putString(
string
$string, [bool
$dynamic = true]
)
|
|
Appends string to buffer.
Appends string to buffer.
Parameters:
|
string |
$string: |
Binary length. |
|
bool |
$dynamic: |
Whether if string length is fixed or not (if it is dynamic then length will be inserted as short before string chunk). |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
Empties buffer.
Empties buffer.
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
void setBuffer(
string
$buffer
)
|
|
Sets properties stream.
Sets properties stream.
Parameters:
|
string |
$buffer: |
Properties stream. |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
Seeks current reading position.
Seeks current reading position.
Parameters:
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
Skips given amount of bytes.
Skips given amount of bytes.
Parameters:
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of stream. |
| Since: | 0.1.2 |
Resets pointer of cloned object.
Resets pointer of cloned object.
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |
Redefined in descendants as:
mixed __get(
string
$name
)
|
|
Magic PHP5 method.
Magic PHP5 method.
Parameters:
|
string |
$name: |
Property name. |
API Tags:
| Return: | Property value. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Throws: | OutOfBoundsException For non-supported properties. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of stream. |
| Since: | 0.1.2 |
Redefined in descendants as:
void __set(
string
$name, mixed
$value
)
|
|
Magic PHP5 method.
Magic PHP5 method.
Parameters:
|
string |
$name: |
Property name. |
|
mixed |
$value: |
Property value. |
API Tags:
Information Tags:
| Version: | 0.1.3 |
| Version: | 0.1.2 |
| Throws: | OutOfBoundsException For non-supported properties. |
| Since: | 0.1.2 |
Redefined in descendants as:
Returns string representation of buffer object.
Returns string representation of buffer object.
API Tags:
| Return: | Object's buffer. |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Since: | 0.1.2 |