XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_ByteStream_FileByteStream Class Reference
Inheritance diagram for Swift_ByteStream_FileByteStream:
Inheritance graph

Public Member Functions

 __construct ($path, $writable=false)
 
 getPath ()
 
 read ($length)
 
 setReadPointer ($byteOffset)
 
- Public Member Functions inherited from Swift_ByteStream_AbstractFilterableInputStream
 addFilter (Swift_StreamFilter $filter, $key)
 
 bind (Swift_InputByteStream $is)
 
 commit ()
 
 flushBuffers ()
 
 removeFilter ($key)
 
 unbind (Swift_InputByteStream $is)
 
 write ($bytes)
 

Protected Member Functions

 _commit ($bytes)
 
 _flush ()
 
- Protected Member Functions inherited from Swift_ByteStream_AbstractFilterableInputStream
 _commit ($bytes)
 
 _flush ()
 

Private Member Functions

 _getReadHandle ()
 
 _getWriteHandle ()
 
 _resetReadHandle ()
 
 _resetWriteHandle ()
 

Private Attributes

 $_mode
 
 $_offset = 0
 
 $_path
 
 $_quotes = false
 
 $_reader
 
 $_writer
 

Detailed Description

Definition at line 22 of file FileByteStream.php.

Constructor & Destructor Documentation

Swift_ByteStream_FileByteStream::__construct (   $path,
  $writable = false 
)

Create a new FileByteStream for $path.

Parameters
string$path
string$writableif true

Definition at line 50 of file FileByteStream.php.

References $path.

Member Function Documentation

Swift_ByteStream_FileByteStream::_commit (   $bytes)
protected

Just write the bytes to the file

Definition at line 115 of file FileByteStream.php.

References _getWriteHandle(), and _resetReadHandle().

Here is the call graph for this function:

Swift_ByteStream_FileByteStream::_flush ( )
protected

Not used

Definition at line 122 of file FileByteStream.php.

Swift_ByteStream_FileByteStream::_getReadHandle ( )
private

Get the resource for reading

Definition at line 127 of file FileByteStream.php.

References $_reader.

Referenced by read().

Here is the caller graph for this function:

Swift_ByteStream_FileByteStream::_getWriteHandle ( )
private

Get the resource for writing

Definition at line 143 of file FileByteStream.php.

References $_writer.

Referenced by _commit().

Here is the caller graph for this function:

Swift_ByteStream_FileByteStream::_resetReadHandle ( )
private

Force a reload of the resource for reading

Definition at line 168 of file FileByteStream.php.

Referenced by _commit().

Here is the caller graph for this function:

Swift_ByteStream_FileByteStream::_resetWriteHandle ( )
private

Force a reload of the resource for writing

Definition at line 158 of file FileByteStream.php.

Swift_ByteStream_FileByteStream::getPath ( )

Get the complete path to the file.

Returns
string

Implements Swift_FileStream.

Definition at line 61 of file FileByteStream.php.

References $_path.

Swift_ByteStream_FileByteStream::read (   $length)

Reads $length bytes from the stream into a string and moves the pointer through the stream by $length. If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.

Parameters
int$length
Returns
string
Exceptions
Swift_IoException

Implements Swift_OutputByteStream.

Definition at line 75 of file FileByteStream.php.

References _getReadHandle().

Here is the call graph for this function:

Swift_ByteStream_FileByteStream::setReadPointer (   $byteOffset)

Move the internal read pointer to $byteOffset in the stream.

Parameters
int$byteOffset
Returns
boolean

Implements Swift_OutputByteStream.

Definition at line 103 of file FileByteStream.php.

Member Data Documentation

Swift_ByteStream_FileByteStream::$_mode
private

The mode this file is opened in for writing

Definition at line 34 of file FileByteStream.php.

Swift_ByteStream_FileByteStream::$_offset = 0
private

The internal pointer offset

Definition at line 28 of file FileByteStream.php.

Swift_ByteStream_FileByteStream::$_path
private

The path to the file

Definition at line 31 of file FileByteStream.php.

Referenced by getPath().

Swift_ByteStream_FileByteStream::$_quotes = false
private

If magic_quotes_runtime is on, this will be true

Definition at line 43 of file FileByteStream.php.

Swift_ByteStream_FileByteStream::$_reader
private

A lazy-loaded resource handle for reading the file

Definition at line 37 of file FileByteStream.php.

Referenced by _getReadHandle().

Swift_ByteStream_FileByteStream::$_writer
private

A lazy-loaded resource handle for writing the file

Definition at line 40 of file FileByteStream.php.

Referenced by _getWriteHandle().


The documentation for this class was generated from the following file: