PHP Class HeadFilter, symfony-1.4
(Default is first 10 lines.)
Example:
Or:
ファイルを表示
Open project: vjousse/symfony-1.4
Class Usage Examples
Public Methods
Method |
Description |
|
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. |
|
Private Methods
Method |
Description |
|
_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. |
|
Method Details
Creates a new HeadFilter using the passed in
Reader for instantiation.
public chain ( Reader $reader ) : object |
$reader |
Reader |
|
return |
object |
A new filter based on this configuration, but filtering
the specified reader. |
Returns the number of lines to be returned in the filtered stream.
Returns first n lines of stream.
public read ( $len = null ) : the |
return |
the |
resulting stream, or -1
if the end of the resulting stream has been reached |
Sets the number of lines to be returned in the filtered stream.