system/io/StringReader.php

Show: inherited
Table of Contents

Dummy class for reading from string of characters.

Package
phing.system.io  

\StringReader

Package: phing\system\io

Dummy class for reading from string of characters.

Parent(s)
\Reader
Author
Hans Lellelid  
Author
Yannick Lecaillez  
Version
$Id$  

Properties

Propertyprivatestring  $_string= ''

Details
Type
string
Propertyprivateint  $currPos= '0'

Default value0Details
Type
int
Propertyprivateint  $mark= '0'

Default value0Details
Type
int

Methods

methodpublic__construct(  $string ) : void

Parameters
Name Type Description
$string
methodpublicclose( ) : void

Close stream.

Throws
Exception Description
\IOException if there is an error closing stream
methodpublicgetResource( ) : string

Returns the filename, url, etc. that is being read from.

This is critical for, e.g., ExpatParser's ability to know the filename that is throwing an ExpatParserException, etc.

Returns
Type Description
string
methodpublicmark( ) : void

If supported, places a "marker" (like a bookmark) at current stream position.

A subsequent call to reset() will move stream position back to last marker (if supported).

methodpublicmarkSupported( ) : boolean

Whether marking is supported.

Returns
Type Description
boolean
methodpublicopen( ) : void

methodpublicread( int $len = null ) : void

Read data from source.

If length is specified, then only that number of chars is read, otherwise stream is read until EOF.

Parameters
Name Type Description
$len int
methodpublicready( ) : boolean

Is stream ready for reading.

Returns
Type Description
boolean
methodpublicreset( ) : void

Reset the current position in stream to beginning or last mark (if supported).

methodpublicskip( int $n ) : void

Move stream position relative to current pos.

Parameters
Name Type Description
$n int
Documentation was generated by DocBlox 0.18.1.