PHP Interface WDS_WP_REST_API\Storage\Store_Interface

Mostra file Open project: webdevstudios/wds-wp-rest-api-connect Interface Usage Examples

Public Methods

Method Description
delete ( string $option = '' ) : boolean Handles deleting the stored data for a connection
get ( string $option, string $key = '', boolean $force = false ) : mixed Retrieve stored option
get_key ( ) Get option key
set ( $options = null ) : Result Update the stored value
set_key ( $key ) Set option key
update ( mixed $value, string $option = '', string $key = '', $set = true ) : Original Update the options array

Method Details

delete() public method

Handles deleting the stored data for a connection
public delete ( string $option = '' ) : boolean
$option string Specific option key to unset. If empty, entire object is deleted.
return boolean Result of deletion from DB

get() public method

Retrieve stored option
public get ( string $option, string $key = '', boolean $force = false ) : mixed
$option string Option array key
$key string Key for secondary array
$force boolean Force a new call to get_option
return mixed Value of option requested

get_key() public method

Get option key
public get_key ( )

set() public method

Update the stored value
public set ( $options = null ) : Result
return Result of storage update/add

set_key() public method

Set option key
public set_key ( $key )

update() public method

Update the options array
Since: 0.1.0
public update ( mixed $value, string $option = '', string $key = '', $set = true ) : Original
$value mixed Value to be updated
$option string Option array key
$key string Key for secondary array
return Original $value if successful