. */ require_once 'creole/util/Lob.php'; /** * A class for handling binary LOBs. * * @author Hans Lellelid * @version $Revision: 1.5 $ * @package creole.util */ class Blob extends Lob { /** * Dump the contents of the file using fpassthru(). * * @return void * @throws Exception if no file or contents. */ function dump() { if (!$this->data) { // hmmm .. must be a file that needs to read in if ($this->inFile) { $fp = @fopen($this->inFile, "rb"); if (!$fp) { throw new Exception('Unable to open file: '.$this->inFile); } fpassthru($fp); @fclose($fp); } else { throw new Exception('No data to dump'); } } else { echo $this->data; } } }