filters/TailFilter.php
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
Properties
Methods

_initialize(
)
:
voidScans the parameters list for the "lines" parameter and uses it to set the number of lines to be returned in the filtered stream.

chain(
object $reader
)
:
objectCreates a new TailFilter using the passed in Reader for instantiation.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $reader | object | A Reader object providing the underlying stream. Must not be |
| Type | Description |
|---|---|
| object | A new filter based on this configuration, but filtering the specified reader. |

getLines(
)
:
integerReturns 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. |

read(
int $len
=
null
)
:
mixedReturns the last n lines of a file.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $len | int | Num chars to read. |
| Type | Description |
|---|---|
| mixed | The filtered buffer or -1 if EOF. |

setLines(
integer $lines
)
:
voidSets 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. |