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

Public Member Functions

 copyPressFile ($pressId, $sourceFile, $destFileName)
 
 getContextFilesPath ($assocType, $contextId)
 
 getPressFilesPath ($pressId)
 
 PublicFileManager ()
 
 removePressFile ($pressId, $fileName)
 
 uploadPressFile ($pressId, $fileName, $destFileName)
 
 writePressFile ($pressId, $destFileName, $contents)
 
- Public Member Functions inherited from PKPPublicFileManager
 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/press' public directory.

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

Member Function Documentation

PublicFileManager::copyPressFile (   $pressId,
  $sourceFile,
  $destFileName 
)

Copy a file to a press' public directory.

Parameters
$pressIdint
$sourceFilestring the source of the file to copy
$destFileNamestring the destination file name
Returns
boolean

Definition at line 77 of file PublicFileManager.inc.php.

References PKPPublicFileManager\copyContextFile().

PublicFileManager::getContextFilesPath (   $assocType,
  $contextId 
)

Get the path to a press' public files directory.

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

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

References Config\getVar().

Referenced by getPressFilesPath().

PublicFileManager::getPressFilesPath (   $pressId)

Get the path to a press' public files directory.

Parameters
$pressIdint Press ID
Returns
string

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

References getContextFilesPath().

PublicFileManager::PublicFileManager ( )

Constructor

Definition at line 23 of file PublicFileManager.inc.php.

PublicFileManager::removePressFile (   $pressId,
  $fileName 
)

Delete a file from a press' public directory.

Parameters
$pressIdint
$fileNamestring the target file name
Returns
boolean

Definition at line 87 of file PublicFileManager.inc.php.

References PKPPublicFileManager\removeContextFile().

PublicFileManager::uploadPressFile (   $pressId,
  $fileName,
  $destFileName 
)

Upload a file to a press' 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 55 of file PublicFileManager.inc.php.

References PKPPublicFileManager\uploadContextFile().

PublicFileManager::writePressFile (   $pressId,
  $destFileName,
  $contents 
)

Write a file to a press' public directory.

Parameters
$pressIdint
$destFileNamestring the destination file name
$contentsstring the contents to write to the file
Returns
boolean

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

References PKPPublicFileManager\writeContextFile().


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