PHP Class IssueFileManager, ojs

Inheritance: extends FileManager
Afficher le fichier Open project: pkp/ojs Class Usage Examples

Méthodes publiques

Свойство Type Description
$_filesDir the path to location of the files
$_issueId the associated issue ID

Méthodes publiques

Méthode 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 méthode

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

contentTypeToAbbrev() public méthode

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

contentTypeToPath() public méthode

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

deleteFile() public méthode

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

deleteIssueTree() public méthode

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

downloadFile() public méthode

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
Résultat boolean

fromTemporaryFile() public méthode

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
Résultat IssueFile the resulting issue file

getFilesDir() public méthode

Get the issue files directory.
public getFilesDir ( ) : string
Résultat string

getIssueId() public méthode

Get the issue ID.
public getIssueId ( ) : integer
Résultat integer

setFilesDir() public méthode

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

setIssueId() public méthode

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