PHP Class BufferedReader, symfony-1.4

Inheritance: extends Reader
Afficher le fichier Open project: vjousse/symfony-1.4 Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Reader $reader, integer $buffsize = 65536 )
close ( )
eof ( ) : boolean Returns whether eof has been reached in stream.
getResource ( )
open ( )
read ( integer $len = null ) : mixed Reads and returns a chunk of data.
readChar ( ) : string Reads a single char from the reader.
readLine ( ) Read a line from input stream.
reset ( )
skip ( $n )

Method Details

__construct() public méthode

public __construct ( Reader $reader, integer $buffsize = 65536 )
$reader Reader The reader (e.g. FileReader).
$buffsize integer The size of the buffer we should use for reading files. A large buffer ensures that most files (all scripts?) are parsed in 1 buffer.

close() public méthode

public close ( )

eof() public méthode

This is important, because filters may want to know if the end of the file (and not just buffer) has been reached.
public eof ( ) : boolean
Résultat boolean

getResource() public méthode

public getResource ( )

open() public méthode

public open ( )

read() public méthode

Reads and returns a chunk of data.
public read ( integer $len = null ) : mixed
$len integer Number of bytes to read. Default is to read configured buffer size number of bytes.
Résultat mixed buffer or -1 if EOF.

readChar() public méthode

Reads a single char from the reader.
public readChar ( ) : string
Résultat string single char or -1 if EOF.

readLine() public méthode

Read a line from input stream.
public readLine ( )

reset() public méthode

public reset ( )

skip() public méthode

public skip ( $n )