PHP Class PublicFileManager, ojs

Inheritance: extends FileManager
Mostra file Open project: pkp/ojs Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor
copyJournalFile ( $journalId, $sourceFile, $destFileName ) : boolean Copy a file to a journals's public directory.
getContextFilesPath ( $assocType, $contextId ) : string Get the path to a journal's public files directory.
getJournalFilesPath ( $journalId ) : string Get the path to a journal's public files directory.
removeJournalFile ( $journalId, $fileName ) : boolean Delete a file from a journal's public directory.
uploadJournalFile ( $journalId, $fileName, $destFileName ) : boolean Upload a file to a journals's public directory.
writeJournalFile ( $journalId, $destFileName, $contents ) : boolean Write a file to a journals's public directory.

Method Details

__construct() public method

Constructor
public __construct ( )

copyJournalFile() public method

Copy a file to a journals's public directory.
public copyJournalFile ( $journalId, $sourceFile, $destFileName ) : boolean
$journalId int
$sourceFile string the source of the file to copy
$destFileName string the destination file name
return boolean

getContextFilesPath() public method

Get the path to a journal's public files directory.
public getContextFilesPath ( $assocType, $contextId ) : string
$assocType int Assoc type for context
$contextId int Press ID
return string

getJournalFilesPath() public method

Get the path to a journal's public files directory.
public getJournalFilesPath ( $journalId ) : string
$journalId int
return string

removeJournalFile() public method

Delete a file from a journal's public directory.
public removeJournalFile ( $journalId, $fileName ) : boolean
$journalId int
$fileName string the target file name
return boolean

uploadJournalFile() public method

Upload a file to a journals's public directory.
public uploadJournalFile ( $journalId, $fileName, $destFileName ) : boolean
$journalId int
$fileName string the name of the file in the upload form
$destFileName string the destination file name
return boolean

writeJournalFile() public method

Write a file to a journals's public directory.
public writeJournalFile ( $journalId, $destFileName, $contents ) : boolean
$journalId int
$destFileName string the destination file name
$contents string the contents to write to the file
return boolean