PHP Class WC_Product_Download

Since: 2.7.0
Author: WooThemes
Inheritance: implements ArrayAccess
Show file Open project: woocommerce/woocommerce Class Usage Examples

Protected Properties

Property Type Description
$data array Data array.

Public Methods

Method Description
file_exists ( ) : boolean Validate file exists.
get_allowed_mime_types ( ) : array Get allowed mime types.
get_data ( ) : array 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 $file_path = '' ) : string Get type of file path set.
is_allowed_filetype ( ) : boolean Check if file is allowed.
offsetExists ( string $offset ) : boolean offsetExists
offsetGet ( string $offset ) : mixed offsetGet
offsetSet ( string $offset, mixed $value ) offsetSet
offsetUnset ( string $offset ) offsetUnset
set_file ( string $value ) Set file.
set_id ( string $value ) Set ID.
set_name ( string $value ) Set name.
set_previous_hash ( string $value ) Set previous_hash.

Method Details

file_exists() public method

Validate file exists.
public file_exists ( ) : boolean
return boolean

get_allowed_mime_types() public method

Get allowed mime types.
public get_allowed_mime_types ( ) : array
return array

get_data() public method

Returns all data for this object.
public get_data ( ) : array
return array

get_file() public method

Get file.
public get_file ( ) : string
return string

get_file_extension() public method

Get file extension.
public get_file_extension ( ) : string
return string

get_file_type() public method

Get file type.
public get_file_type ( ) : string
return string

get_id() public method

Get id.
public get_id ( ) : string
return string

get_name() public method

Get name.
public get_name ( ) : string
return string

get_previous_hash() public method

Get previous_hash.
public get_previous_hash ( ) : string
return string

get_type_of_file_path() public method

Get type of file path set.
public get_type_of_file_path ( string $file_path = '' ) : string
$file_path string optional.
return string absolute, relative, or shortcode.

is_allowed_filetype() public method

Check if file is allowed.
public is_allowed_filetype ( ) : boolean
return boolean

offsetExists() public method

offsetExists
public offsetExists ( string $offset ) : boolean
$offset string
return boolean

offsetGet() public method

offsetGet
public offsetGet ( string $offset ) : mixed
$offset string
return mixed

offsetSet() public method

offsetSet
public offsetSet ( string $offset, mixed $value )
$offset string
$value mixed

offsetUnset() public method

offsetUnset
public offsetUnset ( string $offset )
$offset string

set_file() public method

Set file.
public set_file ( string $value )
$value string

set_id() public method

Set ID.
public set_id ( string $value )
$value string

set_name() public method

Set name.
public set_name ( string $value )
$value string

set_previous_hash() public method

Set previous_hash.
public set_previous_hash ( string $value )
$value string

Property Details

$data protected property

Data array.
Since: 2.7.0
protected array $data
return array