PHP Class PrefixLines, symfony-1.4

Example:
Or:

 
See also: FilterReader
Author: hans lellelid, [email protected]
Inheritance: extends BaseParamFilterReader, implements ChainableReader
Afficher le fichier Open project: vjousse/symfony-1.4 Class Usage Examples

Méthodes publiques

Méthode Description
chain ( Reader $reader ) : object Creates a new PrefixLines filter using the passed in Reader for instantiation.
getPrefix ( ) : string Returns the prefix which will be added at the start of each input line.
read ( $len = null ) : mixed Adds a prefix to each line of input stream and returns resulting stream.
setPrefix ( string $prefix ) Sets the prefix to add at the start of each input line.

Private Methods

Méthode Description
_initialize ( ) Initializes the prefix if it is available from the parameters.

Method Details

chain() public méthode

Creates a new PrefixLines filter using the passed in Reader for instantiation.
public chain ( Reader $reader ) : object
$reader Reader
Résultat object A new filter based on this configuration, but filtering the specified reader

getPrefix() public méthode

Returns the prefix which will be added at the start of each input line.
public getPrefix ( ) : string
Résultat string The prefix which will be added at the start of each input line

read() public méthode

Adds a prefix to each line of input stream and returns resulting stream.
public read ( $len = null ) : mixed
Résultat mixed buffer, -1 on EOF

setPrefix() public méthode

Sets the prefix to add at the start of each input line.
public setPrefix ( string $prefix )
$prefix string The prefix to add at the start of each input line. May be null, in which case no prefix is added.