WC_Product_Download
in package
implements
ArrayAccess
Product download class.
Interfaces, Classes and Traits
- ArrayAccess
Table of Contents
- $data : array<string|int, mixed>
- Data array.
- file_exists() : bool
- Validate file exists.
- get_allowed_mime_types() : array<string|int, mixed>
- Get allowed mime types.
- get_data() : array<string|int, mixed>
- Returns all data for this object.
- get_file() : string
- Get file.
- get_file_extension() : string
- Get file extension.
- get_file_type() : string
- Get file type.
- get_id() : string
- Get id.
- get_name() : string
- Get name.
- get_previous_hash() : string
- Get previous_hash.
- get_type_of_file_path() : string
- Get type of file path set.
- is_allowed_filetype() : bool
- Check if file is allowed.
- offsetExists() : bool
- OffsetExists.
- offsetGet() : mixed
- OffsetGet.
- offsetSet() : mixed
- OffsetSet.
- offsetUnset() : mixed
- OffsetUnset.
- set_file() : mixed
- Set file.
- set_id() : mixed
- Set ID.
- set_name() : mixed
- Set name.
- set_previous_hash() : mixed
- Set previous_hash.
Properties
$data
Data array.
protected
array<string|int, mixed>
$data
= array('id' => '', 'name' => '', 'file' => '')
Tags
Methods
file_exists()
Validate file exists.
public
file_exists() : bool
Return values
bool —get_allowed_mime_types()
Get allowed mime types.
public
get_allowed_mime_types() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_data()
Returns all data for this object.
public
get_data() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_file()
Get file.
public
get_file() : string
Return values
string —get_file_extension()
Get file extension.
public
get_file_extension() : string
Return values
string —get_file_type()
Get file type.
public
get_file_type() : string
Return values
string —get_id()
Get id.
public
get_id() : string
Return values
string —get_name()
Get name.
public
get_name() : string
Return values
string —get_previous_hash()
Get previous_hash.
public
get_previous_hash() : string
Tags
Return values
string —get_type_of_file_path()
Get type of file path set.
public
get_type_of_file_path([string $file_path = '' ]) : string
Parameters
- $file_path : string = ''
-
optional.
Return values
string — absolute, relative, or shortcode.is_allowed_filetype()
Check if file is allowed.
public
is_allowed_filetype() : bool
Return values
bool —offsetExists()
OffsetExists.
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
-
Offset.
Return values
bool —offsetGet()
OffsetGet.
public
offsetGet(string $offset) : mixed
Parameters
- $offset : string
-
Offset.
Return values
mixed —offsetSet()
OffsetSet.
public
offsetSet(string $offset, mixed $value) : mixed
Parameters
- $offset : string
-
Offset.
- $value : mixed
-
Offset value.
Return values
mixed —offsetUnset()
OffsetUnset.
public
offsetUnset(string $offset) : mixed
Parameters
- $offset : string
-
Offset.
Return values
mixed —set_file()
Set file.
public
set_file(string $value) : mixed
Parameters
- $value : string
-
File URL/Path.
Return values
mixed —set_id()
Set ID.
public
set_id(string $value) : mixed
Parameters
- $value : string
-
Download ID.
Return values
mixed —set_name()
Set name.
public
set_name(string $value) : mixed
Parameters
- $value : string
-
Download name.
Return values
mixed —set_previous_hash()
Set previous_hash.
public
set_previous_hash(string $value) : mixed
Parameters
- $value : string
-
Previous hash.