PHP Class Stream_17b32f3_Stream, amp-wp

Inheritance: implements Stream_17b32f3_Streamable_Interface
Show file Open project: Automattic/amp-wp Class Usage Examples

Protected Properties

Property Type Description
$stream_string The string that we have downloaded so far
$strpos integer The pointer in the string

Public Methods

Method Description
peek ( $characters ) : string Get characters from the string but don't move the pointer
read ( $characters ) : string Get Characters from the string
resetPointer ( ) : mixed Resets the pointer to the 0 position
write ( $string ) Append to the stream string

Method Details

peek() public method

Get characters from the string but don't move the pointer
public peek ( $characters ) : string
$characters
return string

read() public method

Get Characters from the string
public read ( $characters ) : string
$characters
return string

resetPointer() public method

Resets the pointer to the 0 position
public resetPointer ( ) : mixed
return mixed

write() public method

Append to the stream string
public write ( $string )
$string

Property Details

$stream_string protected property

The string that we have downloaded so far
protected $stream_string

$strpos protected property

The pointer in the string
protected int $strpos
return integer