PHP Class FileApiHandler, pkp-lib

Inheritance: extends Handler
Afficher le fichier Open project: pkp/pkp-lib

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

Constructor.
public __construct ( )

_getAccessPolicy() public méthode

return the application specific file access policy.
public _getAccessPolicy ( $request, $args, $roleAssignments, $fileIdAndRevision = null ) : SubmissionFileAccessPolicy
$request PKPRequest
$args
$roleAssignments array
$fileIdAndRevision array optional
Résultat SubmissionFileAccessPolicy

_getFileManager() public méthode

return the application specific file manager.
public _getFileManager ( $contextId, $submissionId ) : SubmissionFileManager
$contextId int the context for this manager.
$submissionId int the submission id.
Résultat SubmissionFileManager

authorize() public méthode

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

downloadAllFiles() public méthode

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

downloadFile() public méthode

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

downloadLibraryFile() public méthode

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

enableLinkAction() public méthode

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
Résultat JSONMessage JSON object

recordDownload() public méthode

Record file download and return js event to update grid rows.
public recordDownload ( $args, $request ) : string
$args array
$request Request
Résultat string

recordView() public méthode

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