PHP Class WC_Data_Store

Since: 2.7.0
Author: WooThemes
Afficher le fichier Open project: woocommerce/woocommerce Class Usage Examples

Méthodes publiques

Méthode Description
__call ( $method, $parameters ) Data stores can define additional functions (for example, coupons have some helper methods for increasing or decreasing usage). This passes through to the instance if that function exists.
__construct ( string $object_type ) Tells WC_Data_Store which object (coupon, product, order, etc) store we want to work with.
create ( &$data ) Create an object in the data store.
delete ( &$data, array $args = [] ) Delete an object from the data store.
get_current_class_name ( ) : string Returns the class name of the current data store.
load ( string $object_type ) Loads a data store for us or returns null if an invalid store.
read ( &$data ) Reads an object from the data store.
update ( &$data ) Update an object in the data store.

Method Details

__call() public méthode

Data stores can define additional functions (for example, coupons have some helper methods for increasing or decreasing usage). This passes through to the instance if that function exists.
Since: 2.7.0
public __call ( $method, $parameters )
$method
$parameters

__construct() public méthode

Tells WC_Data_Store which object (coupon, product, order, etc) store we want to work with.
public __construct ( string $object_type )
$object_type string Name of object.

create() public méthode

Create an object in the data store.
Since: 2.7.0
public create ( &$data )

delete() public méthode

Delete an object from the data store.
Since: 2.7.0
public delete ( &$data, array $args = [] )
$args array Array of args to pass to the delete method.

get_current_class_name() public méthode

Returns the class name of the current data store.
Since: 2.7.0
public get_current_class_name ( ) : string
Résultat string

load() public static méthode

Loads a data store for us or returns null if an invalid store.
Since: 2.7.0
public static load ( string $object_type )
$object_type string Name of object.

read() public méthode

Reads an object from the data store.
Since: 2.7.0
public read ( &$data )

update() public méthode

Update an object in the data store.
Since: 2.7.0
public update ( &$data )