PackedDownloadController

Extends \AdminHttpViewController

Class PackedDownloadController

This class implements a mass downloader. It can be used to have the shop retrieve a list of resources (denoted by their URLs) and pack them in a ZIP file. The ZIP file is stored in the cache folder and can then be downloaded.

extends

AdminHttpViewController

category

System

package

AdminHttpViewControllers

Methods

__construct

__construct(\HttpContextReaderInterface $httpContextReader, \HttpResponseProcessorInterface $httpResponseProcessor, \ContentViewInterface $defaultContentView) 
inherited

Arguments

$httpContextReader

\HttpContextReaderInterface

$httpResponseProcessor

\HttpResponseProcessorInterface

$defaultContentView

\ContentViewInterface

Default action method.

actionDefault() : \HttpControllerResponseInterface
inherited

Every controller child class requires at least the default action method, which is invoked when the ::_getQueryParameterData('do') value is not separated by a trailing slash.

Every action method have to return an instance which implements the http controller response interface.

Response

\HttpControllerResponseInterface

Retrieves a number of resources and puts them in a ZIP for later retrieval by the user.

actionDownloadByJson() : \JsonHttpControllerResponse

Input is a JSON-encoded list (array) of URLs. Response is a JSON object with a downloadKey property (cf. actionDownloadPackage()) or an error message.

Response

\JsonHttpControllerResponse

Download a pack of resources retrieved with actionDownloadByJson() identified by a downloadKey

actionDownloadPackage() : \HttpControllerResponse

Response

\HttpControllerResponse

(empty; download is initiated prior to standard response handling)

Returns an error (JSON-encoded) as this controller does not have a default action

defaultAction() : \JsonHttpControllerResponse

Processes a http response object which is get by invoking an action method.

proceed(\HttpContextInterface $httpContext) 
inherited

The action method is determined by the http context reader instance and the current request context. Re-implement this method in child classes to enable XSS and CSRF protection on demand.

see \HttpContextReaderInterface::getActionName \HttpResponseProcessorInterface::proceed
Throws
\LogicException

When no action method is found by the http context reader.

Arguments

$httpContext

\HttpContextInterface

Http context object which hold the request variables.

Makes sure that the admin status is currently given in session

validateCurrentAdminStatus() 
inherited
Throws
\LogicException

Properties