Class File

Description

Located in /models/file.php (line 5)

Object
   |
   --File
Class Constant Summary
Method Summary
 static void add ( $filename,  $prefix, [ $data = array()])
 static void getRelativePathFromID ( $fID)
 void addVersion ( $filename,  $prefix, [ $data = array()])
 void delete ()
 void duplicate ()
 File getByID (int $fID)
 void getDateAdded ()
 void getFileID ()
 void getFileSets ()
 void getPassword ()
 void getPath ()
 void getUserID ()
 FileVersion getVersion ([int $fvID = null])
 void getVersionList ()
 void getVersionToModify ([ $forceCreateNew = false])
 void inFileSet ( $fs)
 void isStarred ([ $u = false])
 void refreshCache ()
 void reindex ()
 void resetPermissions ([ $fOverrideSetPermissions = 0])
 void setOriginalPage ( $ocID)
 void setPassword ( $pw)
 void setPermissions ( $obj,  $canRead,  $canSearch,  $canWrite,  $canAdmin)
 void setStorageLocation ( $item)
 void setUserID ( $uID)
 void trackDownload ([int $rcID = NULL])
 void __call ( $nm,  $a)
Methods
static add (line 314)
  • access: public
void add ( $filename,  $prefix, [ $data = array()])
  • $filename
  • $prefix
  • $data
static getRelativePathFromID (line 79)
  • access: public
void getRelativePathFromID ( $fID)
  • $fID
addVersion (line 338)
  • access: public
void addVersion ( $filename,  $prefix, [ $data = array()])
  • $filename
  • $prefix
  • $data
delete (line 395)

Removes a file, including all of its versions

  • access: public
void delete ()
duplicate (line 273)
  • access: public
void duplicate ()
getApprovedVersion (line 382)
  • access: public
void getApprovedVersion ()
getByID (line 16)

returns a file object for the given file ID

  • access: public
File getByID (int $fID)
  • int $fID
getDateAdded (line 228)
  • access: public
void getDateAdded ()
getDownloadStatistics (line 500)
  • access: public
void getDownloadStatistics ()
getFileID (line 271)
  • access: public
void getFileID ()
getFileSets (line 206)
  • access: public
void getFileSets ()
getOriginalPageObject (line 135)
  • access: public
void getOriginalPageObject ()
getPassword (line 50)
  • access: public
void getPassword ()
getPath (line 45)
  • access: public
void getPath ()
getRecentVersion (line 452)

returns the most recent FileVersion object

  • access: public
FileVersion getRecentVersion ()
getStorageLocationID (line 54)
  • access: public
void getStorageLocationID ()
getUserID (line 196)
  • access: public
void getUserID ()
getVersion (line 464)

returns the FileVersion object for the provided fvID

if none provided returns the approved version

  • access: public
FileVersion getVersion ([int $fvID = null])
  • int $fvID
getVersionList (line 490)

Returns an array of all FileVersion objects owned by this file

  • access: public
void getVersionList ()
getVersionToModify (line 235)

Returns a file version object that is to be written to. Computes whether we can use the current most recent version, OR a new one should be created

  • access: public
void getVersionToModify ([ $forceCreateNew = false])
  • $forceCreateNew
inFileSet (line 386)
  • access: public
void inFileSet ( $fs)
  • $fs
isStarred (line 217)
  • access: public
void isStarred ([ $u = false])
  • $u
overrideFileSetPermissions (line 144)
  • access: public
void overrideFileSetPermissions ()
refreshCache (line 58)
  • access: public
void refreshCache ()
reindex (line 68)
  • access: public
void reindex ()
resetPermissions (line 148)
  • access: public
void resetPermissions ([ $fOverrideSetPermissions = 0])
  • $fOverrideSetPermissions
setOriginalPage (line 125)
  • access: public
void setOriginalPage ( $ocID)
  • $ocID
setPassword (line 118)
  • access: public
void setPassword ( $pw)
  • $pw
setPermissions (line 155)
  • access: public
void setPermissions ( $obj,  $canRead,  $canSearch,  $canWrite,  $canAdmin)
  • $obj
  • $canRead
  • $canSearch
  • $canWrite
  • $canAdmin
setStorageLocation (line 93)
  • access: public
void setStorageLocation ( $item)
  • $item
setUserID (line 200)
  • access: public
void setUserID ( $uID)
  • $uID
trackDownload (line 511)

Tracks File Download, takes the cID of the page that the file was downloaded from

  • access: public
void trackDownload ([int $rcID = NULL])
  • int $rcID
__call (line 40)

For all methods that file does not implement, we pass through to the currently active file version object

  • access: public
void __call ( $nm,  $a)
  • $nm
  • $a
Class Constants
CREATE_NEW_VERSION_THRESHOLD = 300 (line 7)
F_ERROR_FILE_NOT_FOUND = 2 (line 9)
F_ERROR_INVALID_FILE = 1 (line 8)

Documentation generated on Thu, 15 Sep 2011 16:36:25 -0700 by phpDocumentor 1.4.1