2016-11-08 09:39:47 +00:00
|
|
|
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* WC Data Store Interface
|
|
|
|
*
|
|
|
|
* @version 2.7.0
|
|
|
|
* @category Interface
|
|
|
|
* @author WooThemes
|
|
|
|
*/
|
|
|
|
interface WC_Object_Data_Store {
|
2016-11-09 04:37:50 +00:00
|
|
|
|
2016-11-08 09:39:47 +00:00
|
|
|
/**
|
|
|
|
* Method to create a new record of a WC_Data based object.
|
|
|
|
* @param WC_Data
|
|
|
|
*/
|
|
|
|
public function create( &$data );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Method to read a record. Creates a new WC_Data based object.
|
|
|
|
* @param WC_Data
|
|
|
|
*/
|
|
|
|
public function read( &$data );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates a record in the database.
|
|
|
|
* @param WC_Data
|
|
|
|
*/
|
|
|
|
public function update( &$data );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deletes a record from the database.
|
2016-11-15 19:35:10 +00:00
|
|
|
* @param WC_Data
|
|
|
|
* @param array $args Array of args to pass to the delete method.
|
2016-11-15 18:11:25 +00:00
|
|
|
* @return bool result
|
2016-11-08 09:39:47 +00:00
|
|
|
*/
|
2016-11-15 19:35:10 +00:00
|
|
|
public function delete( &$data, $args = array() );
|
2016-11-08 09:39:47 +00:00
|
|
|
}
|