PHP Класс FileApiHandler, pkp-lib

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

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

Метод Описание
__construct ( ) Constructor.
_getAccessPolicy ( $request, $args, $roleAssignments, $fileIdAndRevision = null ) : SubmissionFileAccessPolicy return the application specific file access policy.
_getFileManager ( $contextId, $submissionId ) : SubmissionFileManager return the application specific file manager.
authorize ( $request, &$args, $roleAssignments )
downloadAllFiles ( $args, $request ) Download all passed files.
downloadFile ( $args, $request ) Download a file.
downloadLibraryFile ( $args, $request ) Download a library file.
enableLinkAction ( $args, $request ) : JSONMessage Returns a data changd event to re-enable the link action. Refactored out of recordDownload since library files do not have downloads recorded and are in a different context.
recordDownload ( $args, $request ) : string Record file download and return js event to update grid rows.
recordView ( $submissionFile ) record a file view.

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

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

Constructor.
public __construct ( )

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

return the application specific file access policy.
public _getAccessPolicy ( $request, $args, $roleAssignments, $fileIdAndRevision = null ) : SubmissionFileAccessPolicy
$request PKPRequest
$args
$roleAssignments array
$fileIdAndRevision array optional
Результат SubmissionFileAccessPolicy

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

return the application specific file manager.
public _getFileManager ( $contextId, $submissionId ) : SubmissionFileManager
$contextId int the context for this manager.
$submissionId int the submission id.
Результат SubmissionFileManager

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

public authorize ( $request, &$args, $roleAssignments )

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

Download all passed files.
public downloadAllFiles ( $args, $request )
$args array
$request Request

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

Download a file.
public downloadFile ( $args, $request )
$args array
$request Request

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

Download a library file.
public downloadLibraryFile ( $args, $request )
$args array
$request Request

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

Returns a data changd event to re-enable the link action. Refactored out of recordDownload since library files do not have downloads recorded and are in a different context.
public enableLinkAction ( $args, $request ) : JSONMessage
$args aray
$request Request
Результат JSONMessage JSON object

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

Record file download and return js event to update grid rows.
public recordDownload ( $args, $request ) : string
$args array
$request Request
Результат string

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

Must be overridden in subclases.
public recordView ( $submissionFile )
$submissionFile SubmissionFile the file to record.