PHP Класс HeadFilter, symfony-1.4

(Default is first 10 lines.)

Example:

Or:

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

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

Метод Описание
chain ( Reader $reader ) : object Creates a new HeadFilter using the passed in Reader for instantiation.
getLines ( ) : integer Returns the number of lines to be returned in the filtered stream.
read ( $len = null ) : the Returns first n lines of stream.
setLines ( integer $lines ) Sets the number of lines to be returned in the filtered stream.

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

Метод Описание
_initialize ( ) Scans the parameters list for the "lines" parameter and uses it to set the number of lines to be returned in the filtered stream.

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

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

Creates a new HeadFilter 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.

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

Returns the number of lines to be returned in the filtered stream.
public getLines ( ) : integer
Результат integer The number of lines to be returned in the filtered stream.

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

Returns first n lines of stream.
public read ( $len = null ) : the
Результат the resulting stream, or -1 if the end of the resulting stream has been reached

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

Sets the number of lines to be returned in the filtered stream.
public setLines ( integer $lines )
$lines integer the number of lines to be returned in the filtered stream.