\SecuredFileController
Frontend controller for secured files. Controls aspects of canView() based on file & folder-specific permissions set via the CMS.
- Author: Deviate Ltd 2014-2015 http://www.deviate.net.nz
Synopsis
class SecuredFileController
extends Controller
{
- // members
- private static number $bandwidth_threshold = 10240;
- // methods
- public mixed handleRequest()
- public void treatFileAccordingToStatus()
- public void redirectToLogIn()
- public void notAccessible()
- public string getDefaultPadlockImagePathByConfig()
- public string getDefaultPadlockLoginImagePathByConfig()
- public string getDefaultPadlockImagePath()
- public void sendLockpadSamepleImageToBrowser()
- public void sendFileToBrowser()
- public boolean canSendToBrowser()
Hierarchy
Extends
- Controller
Tasks
Line | Task |
---|---|
329 | dealing with clearing buffers using combinatioin of ob_get_status() and phpversion() |
Members
private
- $bandwidth_threshold
—
number
We calculate the timelimit based on the filesize. Set to 0 to give unlimited timelimit.
Methods
public
- canSendToBrowser()
- getDefaultPadlockImagePath()
- getDefaultPadlockImagePathByConfig()
- getDefaultPadlockLoginImagePathByConfig()
- handleRequest() — Handle the requests, checking the request file exists and is downloadable.
- notAccessible()
- redirectToLogIn()
- sendFileToBrowser()
- sendLockpadSamepleImageToBrowser()
- treatFileAccordingToStatus()