Export
in package
implements
ActionInterface
uses
ActionTrait
This class contains functions to export a member's profile data to a downloadable file.
Tags
Table of Contents
Interfaces
- ActionInterface
- Interface for all action classes.
Properties
- $id : int
- $datatypes : array<string|int, mixed>
- $formats : array<string|int, mixed>
- $obj : static
Methods
- call() : void
- Convenience method to load() and execute() an instance of this class.
- canBeLogged() : bool
- Determines whether this action can be logged in the online log.
- canShowDebuggingInfo() : bool
- Determines whether debugging info should be shown.
- canShowInMaintenanceMode() : bool
- Determines whether this action allows access in maintenance mode.
- createDir() : string|bool
- Returns the path to a secure directory for storing exported profile data.
- execute() : void
- Does the job.
- getFormats() : array<string|int, mixed>
- Helper function that defines data export formats in a single location.
- getOutputType() : OutputTypeInterface
- Gets the output type for this action.
- isAgreementAction() : bool
- Determines whether this action can be accessed without accepting the registration agreement and privacy policy.
- isRestrictedGuestAccessAllowed() : bool
- Determines whether this action allows access if guest access is restricted.
- isSimpleAction() : bool
- Determines whether this is a simple action.
- load() : static
- Static wrapper for constructor.
- __construct() : mixed
- Constructor. Protected to force instantiation via self::load().
- init() : mixed
- Sets up some stuff we need.
Properties
$id
public
int
$id
ID of the member whose profile is being viewed.
$datatypes
protected
array<string|int, mixed>
$datatypes
Types of exportable data, and instructions on how to get it. This is populated by the constructor.
$formats
protected
static array<string|int, mixed>
$formats
= ['XML_XSLT' => ['extension' => 'styled.xml', 'mime' => 'text/xml', 'description' => 'export_format_xml_xslt', 'per_page' => 500], 'HTML' => ['extension' => 'html', 'mime' => 'text/html', 'description' => 'export_format_html', 'per_page' => 500], 'XML' => ['extension' => 'xml', 'mime' => 'text/xml', 'description' => 'export_format_xml', 'per_page' => 2000]]
Supported formats for the export files. Protected to force access via Export::getFormats()
$obj
protected
static static
$obj
An instance of this class. This is used by the load() method to prevent multiple instantiations.
Methods
call()
Convenience method to load() and execute() an instance of this class.
public
static call() : void
canBeLogged()
Determines whether this action can be logged in the online log.
public
canBeLogged() : bool
Return values
boolcanShowDebuggingInfo()
Determines whether debugging info should be shown.
public
canShowDebuggingInfo() : bool
Return values
boolcanShowInMaintenanceMode()
Determines whether this action allows access in maintenance mode.
public
canShowInMaintenanceMode() : bool
Return values
bool —True if access is allowed, false otherwise.
createDir()
Returns the path to a secure directory for storing exported profile data.
public
static createDir([string $fallback = '' ]) : string|bool
The directory is created if it does not yet exist, and is secured using the same method that we use to secure attachment directories. Files in this directory can only be downloaded via the download_export_file() function.
Parameters
- $fallback : string = ''
Return values
string|bool —The path to the directory, or false on error.
execute()
Does the job.
public
execute() : void
getFormats()
Helper function that defines data export formats in a single location.
public
static getFormats() : array<string|int, mixed>
Return values
array<string|int, mixed> —Information about supported data formats for profile exports.
getOutputType()
Gets the output type for this action.
public
getOutputType() : OutputTypeInterface
Return values
OutputTypeInterfaceisAgreementAction()
Determines whether this action can be accessed without accepting the registration agreement and privacy policy.
public
isAgreementAction() : bool
Return values
boolisRestrictedGuestAccessAllowed()
Determines whether this action allows access if guest access is restricted.
public
isRestrictedGuestAccessAllowed() : bool
Return values
bool —True if access is allowed, false otherwise.
isSimpleAction()
Determines whether this is a simple action.
public
isSimpleAction() : bool
Return values
boolload()
Static wrapper for constructor.
public
static load() : static
Return values
static —An instance of this class.
__construct()
Constructor. Protected to force instantiation via self::load().
protected
__construct() : mixed
init()
Sets up some stuff we need.
protected
init() : mixed