Added documentation, removed function _idFromGunid(), which was not used.

This commit is contained in:
paul 2006-11-21 15:47:48 +00:00
parent 012d344db2
commit 94a0be4e6a

View file

@ -50,13 +50,25 @@ class StoredFile {
public $accessTable; public $accessTable;
public $gunid; public $gunid;
/**
* @var string
*/
private $resDir; private $resDir;
/**
* @var string
*/
private $accessDir; private $accessDir;
/** /**
* @var RawMediaData * @var RawMediaData
*/ */
public $rmd; public $rmd;
/**
* @var MetaData
*/
public $md; public $md;
/* ========================================================== constructor */ /* ========================================================== constructor */
@ -193,7 +205,7 @@ class StoredFile {
/** /**
* Create instance of StoreFile object and recall existing file.<br> * Create instance of StoreFile object and recall existing file.<br>
* Should be supplied oid XOR gunid - not both ;) * Should be supplied with oid OR gunid - not both.
* *
* @param GreenBox $gb * @param GreenBox $gb
* @param int $oid * @param int $oid
@ -735,27 +747,28 @@ class StoredFile {
/** /**
* Get local id from global id. * Get local id from global id.
* Static or dynamic call is possible. * Static or dynamic call is possible, argument required for
* static call.
* *
* @param string $gunid * @param string $gunid
* optional (for static call), global unique id of file * optional (for static call), global unique id of file
*/ */
function _idFromGunid($gunid=NULL) // function _idFromGunid($gunid=NULL)
{ // {
if (is_null($gunid)) { // if (is_null($gunid)) {
$gunid = $this->$gunid; // $gunid = $this->$gunid;
} // }
$id = $this->dbc->getOne(" // $id = $this->dbc->getOne("
SELECT id FROM {$this->filesTable} // SELECT id FROM {$this->filesTable}
WHERE gunid=x'$gunid'::bigint // WHERE gunid=x'$gunid'::bigint
"); // ");
if (is_null($id)) { // if (is_null($id)) {
return PEAR::raiseError( // return PEAR::raiseError(
"StoredFile::_idFromGunid: no such global unique id ($gunid)" // "StoredFile::_idFromGunid: no such global unique id ($gunid)"
); // );
} // }
return $id; // return $id;
} // }
/** /**