PHP Class IssueFileManager, ojs

Inheritance: extends FileManager
Datei anzeigen Open project: pkp/ojs Class Usage Examples

Public Properties

Property Type Description
$_filesDir the path to location of the files
$_issueId the associated issue ID

Public Methods

Method Description
__construct ( $issueId ) Constructor.
contentTypeToAbbrev ( $contentType ) : string Return abbreviation based on issue content type (used for naming files).
contentTypeToPath ( $contentType ) : string Return directory path based on issue content type (used for naming files).
deleteFile ( $fileId ) : boolean Delete an issue file by ID.
deleteIssueTree ( ) Delete the entire tree of files belonging to an issue.
downloadFile ( $fileId, $inline = false ) : boolean Download a file.
fromTemporaryFile ( $temporaryFile, $contentType = ISSUE_FILE_PUBLIC ) : IssueFile Create an issue galley based on a temporary file.
getFilesDir ( ) : string Get the issue files directory.
getIssueId ( ) : integer Get the issue ID.
setFilesDir ( $filesDir ) Set the issue files directory.
setIssueId ( $issueId ) Set the issue ID.

Method Details

__construct() public method

Create a manager for handling issue files.
public __construct ( $issueId )
$issueId int

contentTypeToAbbrev() public method

Return abbreviation based on issue content type (used for naming files).
public contentTypeToAbbrev ( $contentType ) : string
$contentType int
return string

contentTypeToPath() public method

Return directory path based on issue content type (used for naming files).
public contentTypeToPath ( $contentType ) : string
$contentType int
return string

deleteFile() public method

Delete an issue file by ID.
public deleteFile ( $fileId ) : boolean
$fileId int
return boolean if successful

deleteIssueTree() public method

Delete the entire tree of files belonging to an issue.
public deleteIssueTree ( )

downloadFile() public method

Download a file.
public downloadFile ( $fileId, $inline = false ) : boolean
$fileId int the file id of the file to download
$inline print file as inline instead of attachment, optional
return boolean

fromTemporaryFile() public method

Create an issue galley based on a temporary file.
public fromTemporaryFile ( $temporaryFile, $contentType = ISSUE_FILE_PUBLIC ) : IssueFile
$temporaryFile TemporaryFile
$contentType int Issue file content type
return IssueFile the resulting issue file

getFilesDir() public method

Get the issue files directory.
public getFilesDir ( ) : string
return string

getIssueId() public method

Get the issue ID.
public getIssueId ( ) : integer
return integer

setFilesDir() public method

Set the issue files directory.
public setFilesDir ( $filesDir )
$filesDir string

setIssueId() public method

Set the issue ID.
public setIssueId ( $issueId )
$issueId int

Property Details

$_filesDir public_oe property

the path to location of the files
public $_filesDir

$_issueId public_oe property

the associated issue ID
public $_issueId