Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PKPLibraryFileManager Class Reference
Inheritance diagram for PKPLibraryFileManager:
PrivateFileManager FileManager LibraryFileManager

Public Member Functions

copyFromTemporaryFile (&$temporaryFile, $libraryFileType)
 
 deleteFile ($fileId)
 
 generateFileName ($type, $originalFileName)
 
 getBasePath ()
 
 getFileSuffixFromType ($type)
 
 getNameFromType ($type)
 
 getTitleKeyFromType ($type)
 
getTypeNameMap ()
 
getTypeSuffixMap ()
 
getTypeTitleKeyMap ()
 
 PKPLibraryFileManager ($contextId)
 
- Public Member Functions inherited from PrivateFileManager
 getBasePath ()
 
 PrivateFileManager ()
 
- Public Member Functions inherited from FileManager
 copyDir ($source, $dest)
 
 copyFile ($source, $dest)
 
 deleteFile ($filePath)
 
 downloadFile ($filePath, $mediaType=null, $inline=false, $fileName=null)
 
 fileExists ($filePath, $type= 'file')
 
 FileManager ()
 
 getDocumentExtension ($type)
 
 getDocumentType ($type)
 
 getExtension ($fileName)
 
 getImageExtension ($type)
 
 getNiceFileSize ($size)
 
 getUploadedFileName ($fileName)
 
 getUploadedFilePath ($fileName)
 
 getUploadedFileType ($fileName)
 
 mkdir ($dirPath, $perms=null)
 
 mkdirtree ($dirPath, $perms=null)
 
 parseFileExtension ($fileName)
 
 readFile ($filePath, $output=false)
 
 rmdir ($dirPath)
 
 rmtree ($file)
 
 setMode ($path, $mask)
 
 truncateFileName ($fileName, $length=127)
 
 uploadedFileExists ($fileName)
 
 uploadError ($fileName)
 
 uploadFile ($fileName, $destFileName)
 
 writeFile ($dest, &$contents)
 

Additional Inherited Members

- Public Attributes inherited from PrivateFileManager
 $filesDir
 

Detailed Description

Wrapper class for uploading files to a site/context' library directory.

Definition at line 20 of file PKPLibraryFileManager.inc.php.

Member Function Documentation

& PKPLibraryFileManager::copyFromTemporaryFile ( $temporaryFile,
  $libraryFileType 
)

Routine to copy a library file from a temporary file.

Parameters
$temporaryFileobject
$libraryFileTypeint LIBRARY_FILE_TYPE_...
Returns
LibraryFile the generated file, prepared as much as possible for insert (false if upload failed)

Definition at line 96 of file PKPLibraryFileManager.inc.php.

PKPLibraryFileManager::deleteFile (   $fileId)

Delete a file by ID.

Parameters
$fileIdint
Returns
int number of files removed

Definition at line 49 of file PKPLibraryFileManager.inc.php.

Referenced by LibraryFileGridHandler\deleteFile().

PKPLibraryFileManager::generateFileName (   $type,
  $originalFileName 
)

Generate a filename for a library file.

Parameters
$typeint LIBRARY_FILE_TYPE_...
$originalFileNamestring
Returns
string

Definition at line 64 of file PKPLibraryFileManager.inc.php.

PKPLibraryFileManager::getBasePath ( )

Get the base path for file storage.

Returns
string

Definition at line 40 of file PKPLibraryFileManager.inc.php.

References DAORegistry\getDAO().

PKPLibraryFileManager::getFileSuffixFromType (   $type)

Get the file suffix for the given file type

Parameters
$typeint LIBRARY_FILE_TYPE_...

Definition at line 117 of file PKPLibraryFileManager.inc.php.

PKPLibraryFileManager::getNameFromType (   $type)

Get the symbolic name from the type

Parameters
$typeint LIBRARY_FILE_TYPE_...

Definition at line 140 of file PKPLibraryFileManager.inc.php.

PKPLibraryFileManager::getTitleKeyFromType (   $type)

Get the display name locale key from the type title

Parameters
$typeint LIBRARY_FILE_TYPE_...

Definition at line 167 of file PKPLibraryFileManager.inc.php.

& PKPLibraryFileManager::getTypeNameMap ( )

Get the type => name mapping array

Returns
array

Definition at line 176 of file PKPLibraryFileManager.inc.php.

& PKPLibraryFileManager::getTypeSuffixMap ( )

Get the type => suffix mapping array

Returns
array

Definition at line 126 of file PKPLibraryFileManager.inc.php.

& PKPLibraryFileManager::getTypeTitleKeyMap ( )

Get the type => locale key mapping array

Returns
array

Definition at line 153 of file PKPLibraryFileManager.inc.php.

PKPLibraryFileManager::PKPLibraryFileManager (   $contextId)

Constructor

Parameters
$contextIdint

Definition at line 31 of file PKPLibraryFileManager.inc.php.


The documentation for this class was generated from the following file: