PHP Class Papi_REST_API_Settings, papi

Show file Open project: wp-papi/papi

Protected Properties

Property Type Description
$entries Papi_Post_Store The post store class.

Public Methods

Method Description
__construct ( ) REST API Settings construct.
get_setting ( string $key, string $value ) : mixed Get setting value for a property.
pre_get_setting ( mixed $value ) : mixed Setup request after callbacks filter so it's only runs on settings endpoint.
prepare_response ( WP_HTTP_Response $response ) : array Prepare settings response.
register ( ) Register options properties.

Method Details

__construct() public method

REST API Settings construct.
public __construct ( )

get_setting() public method

Get setting value for a property.
public get_setting ( string $key, string $value ) : mixed
$key string
$value string
return mixed

pre_get_setting() public method

When the filter is added the rest_pre_get_setting will be removed since it's not used to anything good.
public pre_get_setting ( mixed $value ) : mixed
$value mixed
return mixed

prepare_response() public method

Prepare settings response.
public prepare_response ( WP_HTTP_Response $response ) : array
$response WP_HTTP_Response
return array

register() public method

Register options properties.
public register ( )

Property Details

$entries protected property

The post store class.
protected Papi_Post_Store $entries
return Papi_Post_Store