From 94a0be4e6a52879d588d23b7de980254b964732a Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 21 Nov 2006 15:47:48 +0000 Subject: [PATCH] Added documentation, removed function _idFromGunid(), which was not used. --- .../modules/storageServer/var/StoredFile.php | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/campcaster/src/modules/storageServer/var/StoredFile.php b/campcaster/src/modules/storageServer/var/StoredFile.php index 37b1e61c4..18e2f40c0 100644 --- a/campcaster/src/modules/storageServer/var/StoredFile.php +++ b/campcaster/src/modules/storageServer/var/StoredFile.php @@ -50,13 +50,25 @@ class StoredFile { public $accessTable; public $gunid; + + /** + * @var string + */ private $resDir; + + /** + * @var string + */ private $accessDir; /** * @var RawMediaData */ public $rmd; + + /** + * @var MetaData + */ public $md; /* ========================================================== constructor */ @@ -193,7 +205,7 @@ class StoredFile { /** * Create instance of StoreFile object and recall existing file.
- * Should be supplied oid XOR gunid - not both ;) + * Should be supplied with oid OR gunid - not both. * * @param GreenBox $gb * @param int $oid @@ -735,27 +747,28 @@ class StoredFile { /** * 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 * optional (for static call), global unique id of file */ - function _idFromGunid($gunid=NULL) - { - if (is_null($gunid)) { - $gunid = $this->$gunid; - } - $id = $this->dbc->getOne(" - SELECT id FROM {$this->filesTable} - WHERE gunid=x'$gunid'::bigint - "); - if (is_null($id)) { - return PEAR::raiseError( - "StoredFile::_idFromGunid: no such global unique id ($gunid)" - ); - } - return $id; - } +// function _idFromGunid($gunid=NULL) +// { +// if (is_null($gunid)) { +// $gunid = $this->$gunid; +// } +// $id = $this->dbc->getOne(" +// SELECT id FROM {$this->filesTable} +// WHERE gunid=x'$gunid'::bigint +// "); +// if (is_null($id)) { +// return PEAR::raiseError( +// "StoredFile::_idFromGunid: no such global unique id ($gunid)" +// ); +// } +// return $id; +// } /**