PHP Class WC_Mock_WC_Data

Inheritance: extends WC_Data
Show file Open project: woocommerce/woocommerce Class Usage Examples

Public Properties

Property Type Description
$data_store

Protected Properties

Property Type Description
$cache_group see WC_Data
$data Data array

Public Methods

Method Description
__construct ( $id = '' ) Simple read.
get_bool_value ( string $context = 'view' ) : boolean Simple get bool value.
get_content ( string $context = 'view' ) : string Simple get content.
get_data ( ) : array Simple get data as array.
save ( ) Simple save.
set_bool_value ( $value ) : boolean Simple set bool value.
set_content ( string $content ) Simple set content.

Method Details

__construct() public method

Simple read.
public __construct ( $id = '' )

get_bool_value() public method

Simple get bool value.
public get_bool_value ( string $context = 'view' ) : boolean
$context string
return boolean

get_content() public method

Simple get content.
public get_content ( string $context = 'view' ) : string
$context string
return string

get_data() public method

Simple get data as array.
public get_data ( ) : array
return array

save() public method

Simple save.
public save ( )

set_bool_value() public method

Simple set bool value.
public set_bool_value ( $value ) : boolean
return boolean

set_content() public method

Simple set content.
public set_content ( string $content )
$content string

Property Details

$cache_group protected property

see WC_Data
protected $cache_group

$data protected property

Data array
protected $data

$data_store public property

public $data_store