PHP Class Gc\View\Stream

Based in large part on the example at http://www.php.net/manual/en/function.stream-wrapper-register.php
Mostrar archivo Open project: gotcms/gotcms Class Usage Examples

Protected Properties

Property Type Description
$data string Data for streaming.
$mode string Stream mode.
$path string Current stream path.
$position integer Current stream position.
$stat array Stream stats.

Public Methods

Method Description
__call ( string $method, array $args ) : void Call method
register ( string $name = 'zend.view', boolean $overwrite = true ) : void Register stream wrapper
streamEof ( ) : boolean Tells if we are at the end of the stream.
streamOpen ( string $path, string $mode ) : boolean Opens the script file and converts markup.
streamRead ( integer $count ) : string Reads from the stream.
streamSeek ( integer $offset, integer $whence ) : boolean Seek to a specific point in the stream.
streamStat ( ) : array Stream statistics.
streamTell ( ) : integer Tells the current position in the stream.
streamWrite ( string $data ) : integer Write in the stream
urlStat ( string $path ) : array Retrieve information about a file Always return empty array because data come from the database

Protected Methods

Method Description
removeWrapperName ( string $path ) : string Remove stream wrapper name

Method Details

__call() public method

Call method
public __call ( string $method, array $args ) : void
$method string Method
$args array Arguments
return void

register() public static method

Register stream wrapper
public static register ( string $name = 'zend.view', boolean $overwrite = true ) : void
$name string Name
$overwrite boolean Overwrite wrapper
return void

removeWrapperName() protected method

Remove stream wrapper name
protected removeWrapperName ( string $path ) : string
$path string Path
return string

streamEof() public method

Tells if we are at the end of the stream.
public streamEof ( ) : boolean
return boolean

streamOpen() public method

Opens the script file and converts markup.
public streamOpen ( string $path, string $mode ) : boolean
$path string Path
$mode string Mode
return boolean

streamRead() public method

Reads from the stream.
public streamRead ( integer $count ) : string
$count integer Count
return string

streamSeek() public method

Seek to a specific point in the stream.
public streamSeek ( integer $offset, integer $whence ) : boolean
$offset integer Offset
$whence integer Whence
return boolean

streamStat() public method

Stream statistics.
public streamStat ( ) : array
return array

streamTell() public method

Tells the current position in the stream.
public streamTell ( ) : integer
return integer

streamWrite() public method

Write in the stream
public streamWrite ( string $data ) : integer
$data string Data
return integer

urlStat() public method

Retrieve information about a file Always return empty array because data come from the database
public urlStat ( string $path ) : array
$path string Path
return array

Property Details

$data protected_oe static_oe property

Data for streaming.
protected static string $data
return string

$mode protected_oe property

Stream mode.
protected string $mode
return string

$path protected_oe property

Current stream path.
protected string $path
return string

$position protected_oe static_oe property

Current stream position.
protected static int $position
return integer

$stat protected_oe property

Stream stats.
protected array $stat
return array