Lob Class Reference

Inherited by Blob, and Clob.

List of all members.

Public Member Functions

Protected Attributes


Member Function Documentation

Lob::__construct ( $data = null )

 

Construct a new Lob.
Parameters
sttring $data The data contents of the Lob.

See also setContents()

string Lob::getContents ( )

 

Get the contents of the LOB.
Returns string The characters in this LOB.
Exceptions
Exception 

Lob::setContents ( $data )

 

Set the contents of this LOB. Sets the modified flag to FALSE if this is the first call to setContents() for this object. Sets the bit to TRUE if this any subsequent call to setContents().
Parameters
string $bytes

void Lob::dump ( ) [pure virtual]

 

Dump the contents of the file to stdout. Must be implemented by subclasses so that binary status is handled correctly. (i.e. ignored for Clob, handled for Blob)
Returns void
Exceptions
Exception if no file or contents.

Implemented in Blob, and Clob.

void Lob::setInputFile ( $filePath )

 

Specify the file that we want this LOB read from.
Parameters
string $filePath The location of the file.

Returns void

string Lob::getInputFile ( )

 

Get the file that we want this LOB read from.
Returns string The location of the file.

void Lob::setOutputFile ( $filePath )

 

Specify the file that we want this LOB saved to.
Parameters
string $filePath The location of the file.

Returns void

string Lob::getOutputFile ( )

 

Get the file that we want this LOB saved to.
Returns string $filePath The location of the file.

boolean Lob::isFromFile ( )

 

Returns whether this Lob is loaded from file. This is useful for bypassing need to read in the contents of the Lob.
Returns boolean Whether this LOB is to be read from a file.

void Lob::readFromFile ( $file = null )

 

Read LOB data from file (binary safe). (Implementation may need to be moved into Clob / Blob subclasses, but since file_get_contents() is binary-safe, it hasn't been necessary so far.)
Parameters
string $file Filename may also be specified here (if not specified using setInputFile()).

Returns void
Exceptions
Exception - if no file specified or error on read.

See also setInputFile()

Lob::writeToFile ( $file = null )

 

Write LOB data to file (binary safe). (Impl may need to move into subclasses, but so far not necessary.)
Parameters
string $file Filename may also be specified here (if not set using setOutputFile()).

Exceptions
Exception - if no file specified, no contents to write, or error on write.

See also setOutputFile()

string Lob::__toString ( )

 

Convenience method to get contents of LOB as string.
Returns string

Lob::setModified ( $b )

 

Set whether LOB contents have been modified after initial setting.
Parameters
boolean $b

boolean Lob::isModified ( )

 

Whether LOB contents have been modified after initial setting.
Returns boolean TRUE if the contents have been modified after initial setting. FALSE if contents have not been modified or if no contents have bene set.


Member Data Documentation

Lob::$data [protected]

 

Lob::$outFile [protected]

 

Lob::$inFile [protected]

 


This file is part of the Creole[php5] library.


Copyright © 2004 Hans Lellelid  
Creole[php5] CVS