Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($issueId) | |
contentTypeToAbbrev ($contentType) | |
contentTypeToPath ($contentType) | |
deleteById ($fileId) | |
deleteIssueTree () | |
downloadById ($fileId, $inline=false) | |
fromTemporaryFile ($temporaryFile, $contentType=ISSUE_FILE_PUBLIC) | |
getFilesDir () | |
getIssueId () | |
setFilesDir ($filesDir) | |
setIssueId ($issueId) | |
Public Member Functions inherited from FileManager | |
__construct () | |
compressFile ($filePath) | |
copyDir ($source, $dest) | |
copyFile ($source, $dest) | |
decompressFile ($filePath) | |
deleteByPath ($filePath) | |
downloadByPath ($filePath, $mediaType=null, $inline=false, $fileName=null) | |
fileExists ($filePath, $type='file') | |
getDocumentExtension ($type) | |
getDocumentType ($type) | |
getExtension ($fileName) | |
getFirstUploadedPostName () | |
getImageExtension ($type) | |
getNiceFileSize ($size) | |
getUploadedFileName ($fileName) | |
getUploadedFilePath ($fileName) | |
getUploadedFileType ($fileName) | |
getUploadErrorCode ($fileName) | |
mkdir ($dirPath, $perms=null) | |
mkdirtree ($dirPath, $perms=null) | |
parseFileExtension ($fileName) | |
readFileFromPath ($filePath, $output=false) | |
rmdir ($dirPath) | |
rmtree ($file) | |
setMode ($path, $mask) | |
truncateFileName ($fileName, $length=127) | |
uploadedFileExists ($fileName) | |
uploadError ($fileName) | |
uploadFile ($fileName, $destFileName) | |
writeFile ($dest, &$contents) | |
Data Fields | |
$_filesDir = null | |
$_issueId = null | |
Class defining operations for issue file management.
Issue directory structure: [issue id]/public
Definition at line 22 of file IssueFileManager.inc.php.
IssueFileManager::__construct | ( | $issueId | ) |
Constructor. Create a manager for handling issue files.
$issueId | int |
Definition at line 41 of file IssueFileManager.inc.php.
References DAORegistry\getDAO(), Config\getVar(), setFilesDir(), and setIssueId().
IssueFileManager::contentTypeToAbbrev | ( | $contentType | ) |
Return abbreviation based on issue content type (used for naming files).
$contentType | int |
Definition at line 145 of file IssueFileManager.inc.php.
Referenced by fromTemporaryFile().
IssueFileManager::contentTypeToPath | ( | $contentType | ) |
Return directory path based on issue content type (used for naming files).
$contentType | int |
Definition at line 134 of file IssueFileManager.inc.php.
Referenced by deleteById(), downloadById(), and fromTemporaryFile().
IssueFileManager::deleteById | ( | $fileId | ) |
Delete an issue file by ID.
$fileId | int |
Definition at line 89 of file IssueFileManager.inc.php.
References contentTypeToPath(), DAORegistry\getDAO(), and getFilesDir().
IssueFileManager::deleteIssueTree | ( | ) |
Delete the entire tree of files belonging to an issue.
Definition at line 104 of file IssueFileManager.inc.php.
References getFilesDir().
IssueFileManager::downloadById | ( | $fileId, | |
$inline = false |
|||
) |
Download a file.
$fileId | int the file id of the file to download |
$inline | boolean print file as inline instead of attachment, optional |
Definition at line 114 of file IssueFileManager.inc.php.
References contentTypeToPath(), DAORegistry\getDAO(), and getFilesDir().
IssueFileManager::fromTemporaryFile | ( | $temporaryFile, | |
$contentType = ISSUE_FILE_PUBLIC |
|||
) |
Create an issue galley based on a temporary file.
$temporaryFile | TemporaryFile |
$contentType | int Issue file content type |
Definition at line 157 of file IssueFileManager.inc.php.
References HookRegistry\call(), contentTypeToAbbrev(), contentTypeToPath(), FileManager\copyFile(), Core\getCurrentDate(), DAORegistry\getDAO(), getFilesDir(), getIssueId(), and FileManager\parseFileExtension().
IssueFileManager::getFilesDir | ( | ) |
Get the issue files directory.
Definition at line 56 of file IssueFileManager.inc.php.
References $_filesDir.
Referenced by deleteById(), deleteIssueTree(), downloadById(), and fromTemporaryFile().
IssueFileManager::getIssueId | ( | ) |
Get the issue ID.
Definition at line 72 of file IssueFileManager.inc.php.
References $_issueId.
Referenced by fromTemporaryFile().
IssueFileManager::setFilesDir | ( | $filesDir | ) |
Set the issue files directory.
$filesDir | string |
Definition at line 64 of file IssueFileManager.inc.php.
Referenced by __construct().
IssueFileManager::setIssueId | ( | $issueId | ) |
Set the issue ID.
$issueId | int |
Definition at line 80 of file IssueFileManager.inc.php.
Referenced by __construct().
string IssueFileManager::$_filesDir = null |
the path to location of the files
Definition at line 28 of file IssueFileManager.inc.php.
Referenced by getFilesDir().
int IssueFileManager::$_issueId = null |
the associated issue ID
Definition at line 34 of file IssueFileManager.inc.php.
Referenced by getIssueId().