UNB Components Code Reference

UnbMessageRevision::GetFileData method

Gets the contents of an attachment file.

public function UnbMessageRevision::GetFileData ($searchMode = 0);

Parameters

searchMode  –  optional, default: 0

(int) Specifies how to read the data.
* 0: Find the data whereever it is, look in the database first.
* 1: Find the data whereever it is, look in the filesystem first.
* 2: Only read from the database, return null if it's not there.
* 3: Use readfile to read from the filesystem. Returns true or false depending on success.

Return value

The contents of the attached file, or null if there is no file attached. If searchMode is 3, the return value is a boolean value.

Exceptions thrown

UnbDatabaseException No description available.
UnbSecurityException 

If the message revision was requested with NoContent mode.

Exception 

If the attached data was not found although it's supposed to be there.

Member of class: UnbMessageRevision

Implementation file: messagerevision.class.php, line 1286

© 2011 Yves Goergen. UNB Components Homepage. Reference generated on 2011-02-22.