Lob Class Reference

Inherited by Blob, and Clob.

List of all members.

Public Member Functions

Public Attributes


Constructor & Destructor Documentation

Lob::Lob ( $  data = null)

 

Construct a new Lob.

Parameters:
sttring $data The data contents of the Lob.

See also setContents()


Member Function Documentation

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

Lob::dump ()

 

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.

Reimplemented in Blob, and Clob.

Lob::setInputFile ( $  filePath)

 

Specify the file that we want this LOB read from.

Parameters:
string $filePath The location of the file.

Returns void

& Lob::getInputFile ()

 

Get the file that we want this LOB read from.

Returns string The location of the file.

Lob::setOutputFile ( $  filePath)

 

Specify the file that we want this LOB saved to.

Parameters:
string $filePath The location of the file.

Returns void

& Lob::getOutputFile ()

 

Get the file that we want this LOB saved to.

Returns string $filePath The location of the file.

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.

& 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()

& 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

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

 

Lob::$outFile

 

Lob::$inFile

 

Lob::$modified = null

 


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


Copyright © 2004 Hans Lellelid  
Creole[php4] CVS