Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PKPPublicFileManager Class Reference
Inheritance diagram for PKPPublicFileManager:
FileManager PublicFileManager

Public Member Functions

 copyContextFile ($assocType, $contextId, $sourceFile, $destFileName)
 
 getContextFilesPath ($assocType, $contextId)
 
 getSiteFilesPath ()
 
 PKPPublicFileManager ()
 
 removeContextFile ($assocType, $contextId, $fileName)
 
 removeSiteFile ($fileName)
 
 uploadContextFile ($assocType, $contextId, $fileName, $destFileName)
 
 uploadSiteFile ($fileName, $destFileName)
 
 writeContextFile ($assocType, $contextId, $destFileName, $contents)
 
- Public Member Functions inherited from FileManager
 copyDir ($source, $dest)
 
 copyFile ($source, $dest)
 
 deleteFile ($filePath)
 
 downloadFile ($filePath, $mediaType=null, $inline=false, $fileName=null)
 
 fileExists ($filePath, $type= 'file')
 
 FileManager ()
 
 getDocumentExtension ($type)
 
 getDocumentType ($type)
 
 getExtension ($fileName)
 
 getImageExtension ($type)
 
 getNiceFileSize ($size)
 
 getUploadedFileName ($fileName)
 
 getUploadedFilePath ($fileName)
 
 getUploadedFileType ($fileName)
 
 mkdir ($dirPath, $perms=null)
 
 mkdirtree ($dirPath, $perms=null)
 
 parseFileExtension ($fileName)
 
 readFile ($filePath, $output=false)
 
 rmdir ($dirPath)
 
 rmtree ($file)
 
 setMode ($path, $mask)
 
 truncateFileName ($fileName, $length=127)
 
 uploadedFileExists ($fileName)
 
 uploadError ($fileName)
 
 uploadFile ($fileName, $destFileName)
 
 writeFile ($dest, &$contents)
 

Detailed Description

Wrapper class for uploading files to a site/journal's public directory.

Definition at line 19 of file PKPPublicFileManager.inc.php.

Member Function Documentation

PKPPublicFileManager::copyContextFile (   $assocType,
  $contextId,
  $sourceFile,
  $destFileName 
)

Copy a file to a context's public directory.

Parameters
$assocTypeAssoc type for context
$contextIdint Context ID
$sourceFilestring the source of the file to copy
$destFileNamestring the destination file name
Returns
boolean

Definition at line 88 of file PKPPublicFileManager.inc.php.

References FileManager\copyFile(), and getContextFilesPath().

Referenced by PublicFileManager\copyPressFile().

PKPPublicFileManager::getContextFilesPath (   $assocType,
  $contextId 
)

Get the path to a context's public files directory.

Parameters
$assocTypeint Assoc type for context
$contextIdint Context ID
Returns
string

Definition at line 42 of file PKPPublicFileManager.inc.php.

Referenced by copyContextFile(), removeContextFile(), uploadContextFile(), and writeContextFile().

PKPPublicFileManager::getSiteFilesPath ( )

Get the path to the site public files directory.

Returns
string

Definition at line 32 of file PKPPublicFileManager.inc.php.

References Config\getVar().

Referenced by removeSiteFile(), and uploadSiteFile().

PKPPublicFileManager::PKPPublicFileManager ( )

Constructor

Definition at line 24 of file PKPPublicFileManager.inc.php.

PKPPublicFileManager::removeContextFile (   $assocType,
  $contextId,
  $fileName 
)

Delete a file from a context's public directory.

Parameters
$assocTypeAssoc type for context
$contextIdint Context ID
$fileNamestring the target file name
Returns
boolean

Definition at line 99 of file PKPPublicFileManager.inc.php.

References FileManager\deleteFile(), and getContextFilesPath().

Referenced by PublicFileManager\removePressFile().

PKPPublicFileManager::removeSiteFile (   $fileName)

Delete a file from the site's public directory.

Parameters
$fileNamestring the target file name
Returns
boolean

Definition at line 108 of file PKPPublicFileManager.inc.php.

References FileManager\deleteFile(), and getSiteFilesPath().

PKPPublicFileManager::uploadContextFile (   $assocType,
  $contextId,
  $fileName,
  $destFileName 
)

Upload a file to a context's public directory.

Parameters
$assocTypeint The assoc type of the context
$contextIdint The context ID
$fileNamestring the name of the file in the upload form
$destFileNamestring the destination file name
Returns
boolean

Definition at line 54 of file PKPPublicFileManager.inc.php.

References getContextFilesPath(), and FileManager\uploadFile().

Referenced by PublicFileManager\uploadPressFile().

PKPPublicFileManager::uploadSiteFile (   $fileName,
  $destFileName 
)

Upload a file to the site's public directory.

Parameters
$fileNamestring the name of the file in the upload form
$destFileNamestring the destination file name
Returns
boolean

Definition at line 76 of file PKPPublicFileManager.inc.php.

References getSiteFilesPath(), and FileManager\uploadFile().

PKPPublicFileManager::writeContextFile (   $assocType,
  $contextId,
  $destFileName,
  $contents 
)

Write a file to a context's public directory.

Parameters
$assocTypeint Assoc type for context
$contextIdint Context ID
$destFileNamestring the destination file name
$contentsstring the contents to write to the file
Returns
boolean

Definition at line 66 of file PKPPublicFileManager.inc.php.

References getContextFilesPath(), and FileManager\writeFile().

Referenced by PublicFileManager\writePressFile().


The documentation for this class was generated from the following file: