PHP 클래스 FileApiHandler, pkp-lib

상속: extends Handler
파일 보기 프로젝트 열기: pkp/pkp-lib

공개 메소드들

메소드 설명
__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.