filters/TailFilter.php

Show: inherited
Table of Contents

Reads the last <code>n</code> lines of a stream. (Default is last10 lines.)

Example:

Or:


  
Author
Yannick Lecaillez  
Author
hans lellelid, hans@velum.net  
Copyright
© 2003 seasonfive. All rights reserved  
Package
phing.filters  
See
\BaseParamFilterReader  
Version
$Revision: 526 $  

\TailFilter

Package: phing\filters

Reads the last <code>n</code> lines of a stream. (Default is last10 lines.)

Example:

Or:


  
Implements
\ChainableReader
Parent(s)
\BaseParamFilterReader < \BaseFilterReader < \FilterReader < \Reader
See
\BaseParamFilterReader  
Author
Yannick Lecaillez  
Author
hans lellelid, hans@velum.net  
Copyright
© 2003 seasonfive. All rights reserved  
Version
$Revision: 526 $  

Constants

Constantstring  LINES_KEY = "lines"

Parameter name for the number of lines to be returned.

string

Properties

Propertyprivatearray  $_lineBuffer= 'array()'

Array to hold lines.

Default valuearray()Details
Type
array
Propertyprivateinteger  $_lines= '10'

Number of lines to be returned in the filtered stream.

Default value10Details
Type
integer

Methods

methodpublic__construct( ) : void

methodprivate_initialize( ) : void

Scans the parameters list for the "lines" parameter and uses it to set the number of lines to be returned in the filtered stream.

methodpublicchain( object $reader ) : object

Creates a new TailFilter using the passed in Reader for instantiation.

Parameters
Name Type Description
$reader object

A Reader object providing the underlying stream. Must not be null.

Returns
Type Description
object A new filter based on this configuration, but filtering the specified reader.
methodpublicclose( ) : void

methodpubliceof( ) : void

methodpublicgetInitialized( ) : void

methodpublicgetLines( ) : integer

Returns the number of lines to be returned in the filtered stream.

Returns
Type Description
integer The number of lines to be returned in the filtered stream.
methodpublicgetParameters( ) : void

methodpublicgetProject( ) : void

methodpublicgetResource( ) : void

methodpubliclog( ) : void

methodpublicmark( ) : void

methodpublicmarkSupported( ) : void

methodpublicread( int $len = null ) : mixed

Returns the last n lines of a file.

Parameters
Name Type Description
$len int

Num chars to read.

Returns
Type Description
mixed The filtered buffer or -1 if EOF.
methodpublicreadLine( ) : void

methodpublicready( ) : void

methodpublicreset( ) : void

methodpublicsetInitialized( ) : void

methodpublicsetLines( integer $lines ) : void

Sets the number of lines to be returned in the filtered stream.

Parameters
Name Type Description
$lines integer

the number of lines to be returned in the filtered stream.

methodpublicsetParameters( ) : void

methodpublicsetProject( ) : void

methodpublicsetReader( ) : void

methodpublicskip( ) : void

Documentation was generated by DocBlox 0.17.1.