PHP Класс PrefixLines, symfony-1.4

Example:
Or:

 
См. также: FilterReader
Автор: hans lellelid, [email protected]
Наследование: extends BaseParamFilterReader, implements ChainableReader
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
chain ( Reader $reader ) : object Creates a new PrefixLines filter using the passed in Reader for instantiation.
getPrefix ( ) : string Returns the prefix which will be added at the start of each input line.
read ( $len = null ) : mixed Adds a prefix to each line of input stream and returns resulting stream.
setPrefix ( string $prefix ) Sets the prefix to add at the start of each input line.

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

Метод Описание
_initialize ( ) Initializes the prefix if it is available from the parameters.

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

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

Creates a new PrefixLines filter using the passed in Reader for instantiation.
public chain ( Reader $reader ) : object
$reader Reader
Результат object A new filter based on this configuration, but filtering the specified reader

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

Returns the prefix which will be added at the start of each input line.
public getPrefix ( ) : string
Результат string The prefix which will be added at the start of each input line

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

Adds a prefix to each line of input stream and returns resulting stream.
public read ( $len = null ) : mixed
Результат mixed buffer, -1 on EOF

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

Sets the prefix to add at the start of each input line.
public setPrefix ( string $prefix )
$prefix string The prefix to add at the start of each input line. May be null, in which case no prefix is added.