PHP Class WDS_WP_REST_API\Storage\Options

Inheritance: implements WDS_WP_REST_API\Storage\Store_Interface
Afficher le fichier Open project: webdevstudios/wds-wp-rest-api-connect

Protected Properties

Свойство Type Description
$do_autoload
$is_array_option
$key
$option

Méthodes publiques

Méthode Description
__construct ( $is_array_option = true, $do_autoload = false )
delete ( string $option = '' ) : boolean Handles deleting the stored data for a connection.
get ( string $option = 'all', 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 = '', boolean $set = true ) : Original Update the options array

Méthodes protégées

Méthode Description
add_db ( )
delete_from_db ( )
delete_partial ( mixed $option ) : boolean Handles unsetting part of the option array.
get_from_db ( )
update_db ( )

Method Details

__construct() public méthode

public __construct ( $is_array_option = true, $do_autoload = false )

add_db() protected méthode

protected add_db ( )

delete() public méthode

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.
Résultat boolean Result of deletion from DB.

delete_from_db() protected méthode

protected delete_from_db ( )

delete_partial() protected méthode

Handles unsetting part of the option array.
protected delete_partial ( mixed $option ) : boolean
$option mixed Array key or array of array keys to unset.
Résultat boolean Whether partial delete was successful.

get() public méthode

Retrieve stored option
public get ( string $option = 'all', 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
Résultat mixed Value of option requested

get_from_db() protected méthode

protected get_from_db ( )

get_key() public méthode

Get option key
public get_key ( )

set() public méthode

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

set_key() public méthode

Set option key
public set_key ( $key )

update() public méthode

Update the options array
Since: 0.1.0
public update ( mixed $value, string $option = '', string $key = '', boolean $set = true ) : Original
$value mixed Value to be updated
$option string Option array key
$key string Key for secondary array
$set boolean Whether to set the updated value in the DB.
Résultat Original $value if successful

update_db() protected méthode

protected update_db ( )

Property Details

$do_autoload protected_oe property

protected $do_autoload

$is_array_option protected_oe property

protected $is_array_option

$key protected_oe property

protected $key

$option protected_oe property

protected $option