classes/phing/filters/HeadFilter.php
\HeadFilter
Reads the first <code>n</code> lines of a stream.
(Default is first 10 lines.)
<
p> Example:
Or:
- Extends from
- \BaseParamFilterReader
- Implements
- \ChainableReader
- see
- \FilterReader
- access
- public
- author
- Yannick Lecaillez
- author
- hans lellelid, hans@velum.net
- copyright
- © 2003 seasonfive. All rights reserved
- package
- phing.filters
- version
- $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $
Constants
Properties

integer
$_lines= '10'
Number of lines to be returned in the filtered stream.
10Details- Type
- integer
Methods

_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(
object $reader
)
:
objectCreates a new HeadFilter using the passed in
Reader for instantiation.
| Name | Type | Description |
|---|---|---|
| $reader | object | A Reader object providing the underlying stream. Must not be |
| Type | Description |
|---|---|
| object |

getLines(
)
:
integerReturns the number of lines to be returned in the filtered stream.
| Type | Description |
|---|---|
| integer |

read(
$len
=
null
)
:
\theReturns first n lines of stream.
| Name | Type | Description |
|---|---|---|
| $len |
| Type | Description |
|---|---|
| \the |
- exception
- IOException if the underlying stream throws an IOException during reading