phing-filters

# Class: TailFilter Source Location: /filters/TailFilter.php
### Class Overview
    Reader
       |
       --FilterReader
          |
          --BaseFilterReader
             |
             --BaseParamFilterReader
                |
                --TailFilter
Reads the last n lines of a stream. (Default is last10 lines.) #### Author(s): hans lellelid, hans@velum.net <href="mailto:yl@seasonfive.com" a href="mailto:yl@seasonfive.com">Yannick Lecaillez</a> #### Version: $Revision: 526 $ #### Copyright: © 2003 seasonfive. All rights reserved Implements interfaces: ChainableReader | ### Constants LINES_KEY | ### Methods chain getLines read setLines
### Inherited Variables #### Class: BaseParamFilterReader BaseParamFilterReader::$_parameters #### Class: BaseFilterReader BaseFilterReader::$initialized BaseFilterReader::$project #### Class: FilterReader FilterReader::$in | ### Inherited Methods #### Class: BaseParamFilterReader BaseParamFilterReader::getParameters() BaseParamFilterReader::setParameters() #### Class: BaseFilterReader BaseFilterReader::__construct() Constructor used by Phing's introspection mechanism. BaseFilterReader::eof() Returns whether the end of file has been reached with input stream. BaseFilterReader::getInitialized() Returns the initialized status. BaseFilterReader::getProject() Returns the project this filter is part of. BaseFilterReader::log() Convenience method to support logging in filters. BaseFilterReader::read() Reads characters. BaseFilterReader::readLine() Reads a line of text ending with '\n' (or until the end of the stream). BaseFilterReader::setInitialized() Sets the initialized status. BaseFilterReader::setProject() Sets the project to work with. #### Class: FilterReader FilterReader::__construct() FilterReader::close() FilterReader::getResource() FilterReader::read() Read data from source. FilterReader::reset() FilterReader::setReader() FilterReader::skip() #### Class: Reader Reader::close() Close stream. Reader::getResource() Returns the filename, url, etc. that is being read from. Reader::mark() If supported, places a "marker" (like a bookmark) at current stream position. Reader::markSupported() Whether marking is supported. Reader::read() Read data from source. Reader::ready() Is stream ready for reading. Reader::reset() Reset the current position in stream to beginning or last mark (if supported). Reader::skip() Move stream position relative to current pos.
### Class Details [line 45] Reads the last n lines of a stream. (Default is last10 lines.) Example:
Or:
#### Tags:
author: | hans lellelid, hans@velum.net
author: | <href="mailto:yl@seasonfive.com" a href="mailto:yl@seasonfive.com">Yannick Lecaillez</a>
version: | $Revision: 526 $
copyright: | © 2003 seasonfive. All rights reserved
see: | BaseParamFilterReader
[ Top ] ### Class Methods ### method chain [line 132]
`object A chain( $reader)`
Creates a new TailFilter using the passed in Reader for instantiation. #### Tags:
return: | new filter based on this configuration, but filtering the specified reader.
Implementation of: ChainableReader::chain() Returns a reader with the same configuration as this one, but filtering input from the specified reader. #### Parameters:
object A | $reader | Reader object providing the underlying stream. Must not be null .
[ Top ] ### method getLines [line 118]
`integer getLines( )`
Returns the number of lines to be returned in the filtered stream. #### Tags:
return: | The number of lines to be returned in the filtered stream.
[ Top ] ### method read [line 71]
`mixed read( [int $len = null])`
Returns the last n lines of a file. #### Tags:
return: | The filtered buffer or -1 if EOF.
Overrides BaseFilterReader::read() (Reads characters.) #### Parameters:
int | $len | Num chars to read.
[ Top ] ### method setLines [line 109]
`void setLines( integer $lines)`
Sets the number of lines to be returned in the filtered stream. #### Parameters:
integer | $lines | the number of lines to be returned in the filtered stream.
[ Top ] ### Class Constants #### LINES_KEY = "lines" [line 51] Parameter name for the number of lines to be returned. [ Top ] Documentation generated on Mon, 19 Oct 2009 10:52:10 +0200 by phpDocumentor 1.4.3