\DownloadComponent

Class DownloadComponent

Summary

Methods
Properties
Constants
initialize()
doDownload()
doDownloadByUploadFileId()
doDownloadByUploadFile()
No public properties found
No constants found
_downloadUploadFile()
$_controller
N/A
No private methods found
No private properties found
N/A

Properties

$_controller

$_controller : \Controller

Type

\Controller — コントローラ

Methods

initialize()

initialize(\Controller  $controller) : void

Called before the Controller::beforeFilter().

Parameters

\Controller $controller

Instantiating controller

doDownload()

doDownload(integer  $contentId, array  $options = array()) : \CakeResponse|null

ダウンロード実行

Parameters

integer $contentId

コンテンツID

array $options

オプション field : ダウンロードのフィールド名, size: nullならオリジナル thumb, small, medium, big

Throws

\ForbiddenException

Returns

\CakeResponse|null

doDownloadByUploadFileId()

doDownloadByUploadFileId(integer  $uploadFileId, array  $options = array()) : \CakeResponse|null

UploadFileのID指定でのダウンロード実行

Parameters

integer $uploadFileId

UploadFile ID

array $options

オプション field : ダウンロードのフィールド名, size: nullならオリジナル thumb, small, medium, big

Throws

\ForbiddenException

Returns

\CakeResponse|null

doDownloadByUploadFile()

doDownloadByUploadFile(array  $file, array  $options = array()) : \CakeResponse|null

UploadFileのデータ指定でのダウンロード実行

Parameters

array $file

UploadFile data

array $options

オプション field : ダウンロードのフィールド名, size: nullならオリジナル thumb, small, medium, big

Throws

\ForbiddenException

Returns

\CakeResponse|null

_downloadUploadFile()

_downloadUploadFile(array  $file, string  $size, array  $options) : \CakeResponse|null

ダウンロード処理

Parameters

array $file

UploadFile data

string $size

サムネイル名

array $options

オプション

Throws

\ForbiddenException
\BadRequestException
\NotFoundException

Returns

\CakeResponse|null