Class Stream
Streaming interface base class.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Stream
Direct known subclasses
Core\Stream\Buildin
,
Core\Stream\Driver\csv
,
Core\Stream\Driver\null
Indirect known subclasses
Core\Stream\Driver\file
,
Core\Stream\Driver\input
,
Core\Stream\Driver\memory
,
Core\Stream\Driver\output
,
Core\Stream\Driver\stderr
,
Core\Stream\Driver\stdin
,
Core\Stream\Driver\stdout
,
Core\Stream\Driver\swap
Namespace: Core
Package: Core\Stream
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Located at Stream.inc.php
Methods summary
public
|
|
public
|
|
protected
|
|
public static
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
integer|boolean
|
#
chain(
Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions. Assigned Encoder or Decoder wrappers to the current Stream object. |
public
|
|
public
|
|
public
boolean
|
|
abstract public
integer|null
|
|
abstract public
mixed
|
|
public
mixed|null
|
|
public
mixed|null
|
|
public static
|
|
public static
|
|
public static
|
|
abstract public
integer
|
|
public
integer
|
#
writeln( string $string = null )
Writes a string, followed by a newline (LF) character, to the stream. |
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
__toString()
,
attachMethod()
,
getValueForKey()
,
getValueForKeyPath()
,
getValueForUndefinedKey()
,
hash()
,
issetValueForKey()
,
setValueForKey()
,
setValueForKeyPath()
,
setValueForUndefinedKey()
,
uuid()
Constants summary
string |
CharsetParameter
Charset of Stream data (for reading and writing). Defaults to |
#
'charset'
|
integer |
Stat
Access flag for readings stream status information. |
#
1
|
integer |
Read
Establishes Stream connection for reading. |
#
2
|
integer |
Write
Establishes Stream connection for writing. |
#
4
|
integer |
Truncate
Truncates the Stream if possible. Otherwise write operations append stream data. |
#
8
|
integer |
Create
Creates the Stream endpoint, if the destination does not exist. |
#
16
|
Constants inherited from Core\Object
AnyParameterType
,
AutochainParameterType
,
AutocreateParameterType
,
BooleanParameterType
,
CharParameterType
,
EnumParameterType
,
IntegerParameterType
,
RealParameterType
,
StringParameterType
,
UserParameterType
Properties summary
protected
integer
|
$_v_access
Currently established access bit flags. |
#
0
|
protected
|
$_v_decoder
Active (chained) decoder instance or |
|
protected
|
$_v_encoder
Active (chained) encoder instance or |
|
protected
boolean
|
$_v_established
|
|
protected
|
$_v_onDismantle
Delegate invoked if an established stream is dismantled. |
|
protected
array
|
$_v_parameters
Associative array of Stream parameters set for this instance. |
|
protected
|
$_v_uri
URI used to create the current Stream instance. |
Magic properties
public read-only
integer
|
$access
Access status flag. |
public read-only
boolean
|
$canCreate
|
public read-only
boolean
|
$canRead
|
public read-only
boolean
|
$canStat
|
public read-only
boolean
|
$canTruncate
|
public read-only
boolean
|
$canWrite
|
public read-only
|
$decoder
Chained decoder instance to transparently decode data being read. |
public read-only
|
$encoder
Chained encoder instance to transparently encode data being written. |
public read-only
boolean
|
$established
|
public read-only
integer
|
$length
Length of the stream in units or |
public read-only
|
$onDismantle
Callback invoked if stream is dismantled. |
public read-only
array
|
$parameters
Associative array of stream parameters from configuration URI. |
public read-only
|
$uri
Configuration URI. |