PHP Class WC_Customer_Download

Since: 2.7.0
Author: WooThemes
Inheritance: extends WC_Data, implements ArrayAccess
ファイルを表示 Open project: woocommerce/woocommerce Class Usage Examples

Protected Properties

Property Type Description
$data array Download Data array.

Public Methods

Method Description
__construct ( integer | object | array $download ) Constructor.
get_access_expires ( string $context = 'view' ) : integer Get access_expires.
get_access_granted ( string $context = 'view' ) : integer Get access_granted.
get_download_count ( string $context = 'view' ) : integer Get download_count.
get_download_id ( string $context = 'view' ) : string Get download id.
get_downloads_remaining ( string $context = 'view' ) : integer Get downloads_remaining.
get_order_id ( string $context = 'view' ) : integer Get order_id.
get_order_key ( string $context = 'view' ) : string Get order_key.
get_product_id ( string $context = 'view' ) : integer Get product id.
get_user_email ( string $context = 'view' ) : string Get user_email.
get_user_id ( string $context = 'view' ) : integer Get user id.
offsetExists ( string $offset ) : boolean offsetExists
offsetGet ( string $offset ) : mixed offsetGet
offsetSet ( string $offset, mixed $value ) offsetSet
offsetUnset ( string $offset ) offsetUnset
save ( ) : integer Save data to the database.
set_access_expires ( integer $timestamp ) Get access_expires.
set_access_granted ( integer $timestamp ) Get access_granted.
set_download_count ( integer $value ) Get download_count.
set_download_id ( string $value ) Set download id.
set_downloads_remaining ( integer $value ) Get downloads_remaining.
set_order_id ( integer $value ) Get order_id.
set_order_key ( string $value ) Get order_key.
set_product_id ( integer $value ) Set product id.
set_user_email ( integer $value ) Get user_email.
set_user_id ( integer $value ) Get user id.

Protected Methods

Method Description
get_hook_prefix ( ) : string Prefix for action and filter hooks on data.

Method Details

__construct() public method

Constructor.
public __construct ( integer | object | array $download )
$download integer | object | array

get_access_expires() public method

Get access_expires.
public get_access_expires ( string $context = 'view' ) : integer
$context string
return integer

get_access_granted() public method

Get access_granted.
public get_access_granted ( string $context = 'view' ) : integer
$context string
return integer

get_download_count() public method

Get download_count.
public get_download_count ( string $context = 'view' ) : integer
$context string
return integer

get_download_id() public method

Get download id.
public get_download_id ( string $context = 'view' ) : string
$context string
return string

get_downloads_remaining() public method

Get downloads_remaining.
public get_downloads_remaining ( string $context = 'view' ) : integer
$context string
return integer

get_hook_prefix() protected method

Prefix for action and filter hooks on data.
Since: 2.7.0
protected get_hook_prefix ( ) : string
return string

get_order_id() public method

Get order_id.
public get_order_id ( string $context = 'view' ) : integer
$context string
return integer

get_order_key() public method

Get order_key.
public get_order_key ( string $context = 'view' ) : string
$context string
return string

get_product_id() public method

Get product id.
public get_product_id ( string $context = 'view' ) : integer
$context string
return integer

get_user_email() public method

Get user_email.
public get_user_email ( string $context = 'view' ) : string
$context string
return string

get_user_id() public method

Get user id.
public get_user_id ( string $context = 'view' ) : integer
$context string
return integer

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

save() public method

Save data to the database.
Since: 2.7.0
public save ( ) : integer
return integer Item ID

set_access_expires() public method

Get access_expires.
public set_access_expires ( integer $timestamp )
$timestamp integer

set_access_granted() public method

Get access_granted.
public set_access_granted ( integer $timestamp )
$timestamp integer

set_download_count() public method

Get download_count.
public set_download_count ( integer $value )
$value integer

set_download_id() public method

Set download id.
public set_download_id ( string $value )
$value string

set_downloads_remaining() public method

Get downloads_remaining.
public set_downloads_remaining ( integer $value )
$value integer

set_order_id() public method

Get order_id.
public set_order_id ( integer $value )
$value integer

set_order_key() public method

Get order_key.
public set_order_key ( string $value )
$value string

set_product_id() public method

Set product id.
public set_product_id ( integer $value )
$value integer

set_user_email() public method

Get user_email.
public set_user_email ( integer $value )
$value integer

set_user_id() public method

Get user id.
public set_user_id ( integer $value )
$value integer

Property Details

$data protected_oe property

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