PHP Класс Kraken\Util\Buffer\BufferIterator

Наследование: implements SeekableIterato\SeekableIterator
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( Kraken\Util\Buffer\BufferInterface $buffer )
__destruct ( )
current ( ) : string Return the current character in the buffer at the iterator position.
insert ( string $data ) Insert the given string into the buffer at the current iterator position.
key ( ) : integer Return the current position (key) of the iterator.
next ( ) Move to the next character in the buffer.
prev ( ) Move to the previous character in the buffer.
remove ( ) : string Remove the byte at the current iterator position and moves the iterator to the previous character.
replace ( string $data ) : string Replace the byte at the current iterator position with the given string.
rewind ( ) Rewind the iterator to the beginning of the buffer.
seek ( integer $position ) Move to the given position in the buffer.
valid ( ) : boolean Determine if the iterator is valid.

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

__construct() публичный Метод

public __construct ( Kraken\Util\Buffer\BufferInterface $buffer )
$buffer Kraken\Util\Buffer\BufferInterface

__destruct() публичный Метод

public __destruct ( )

current() публичный Метод

Return the current character in the buffer at the iterator position.
public current ( ) : string
Результат string

insert() публичный Метод

Insert the given string into the buffer at the current iterator position.
public insert ( string $data )
$data string

key() публичный Метод

Return the current position (key) of the iterator.
public key ( ) : integer
Результат integer

next() публичный Метод

Move to the next character in the buffer.
public next ( )

prev() публичный Метод

Move to the previous character in the buffer.
public prev ( )

remove() публичный Метод

Remove the byte at the current iterator position and moves the iterator to the previous character.
public remove ( ) : string
Результат string

replace() публичный Метод

Replace the byte at the current iterator position with the given string.
public replace ( string $data ) : string
$data string
Результат string

rewind() публичный Метод

Rewind the iterator to the beginning of the buffer.
public rewind ( )

seek() публичный Метод

Move to the given position in the buffer.
public seek ( integer $position )
$position integer

valid() публичный Метод

Determine if the iterator is valid.
public valid ( ) : boolean
Результат boolean