PHP Класс IssueFileManager, ojs

Наследование: extends FileManager
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_filesDir the path to location of the files
$_issueId the associated issue ID

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

contentTypeToAbbrev() публичный Метод

Return abbreviation based on issue content type (used for naming files).
public contentTypeToAbbrev ( $contentType ) : string
$contentType int
Результат string

contentTypeToPath() публичный Метод

Return directory path based on issue content type (used for naming files).
public contentTypeToPath ( $contentType ) : string
$contentType int
Результат string

deleteFile() публичный Метод

Delete an issue file by ID.
public deleteFile ( $fileId ) : boolean
$fileId int
Результат boolean if successful

deleteIssueTree() публичный Метод

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

downloadFile() публичный Метод

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
Результат boolean

fromTemporaryFile() публичный Метод

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
Результат IssueFile the resulting issue file

getFilesDir() публичный Метод

Get the issue files directory.
public getFilesDir ( ) : string
Результат string

getIssueId() публичный Метод

Get the issue ID.
public getIssueId ( ) : integer
Результат integer

setFilesDir() публичный Метод

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

setIssueId() публичный Метод

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

Описание свойств

$_filesDir публичное свойство

the path to location of the files
public $_filesDir

$_issueId публичное свойство

the associated issue ID
public $_issueId