PHP 클래스 HeadFilter, symfony-1.4

(Default is first 10 lines.)

Example:

Or:

   
또한 보기: FilterReader
저자: hans lellelid, [email protected]
상속: extends BaseParamFilterReader, implements ChainableReader
파일 보기 프로젝트 열기: vjousse/symfony-1.4 1 사용 예제들

공개 메소드들

메소드 설명
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.