\MainWP\Dashboard\Module\CostTrackerCost_Tracker_Rest_Api_Handle

Class Cost_Tracker_Rest_Api_Handle

Summary

Methods
Properties
Constants
instance()
valid_api_request_data_by()
prepare_api_costs_data()
get_cost_field_value()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$instance
N/A

Properties

$instance

$instance : mixed

Protected static variable to hold the single instance of the class.

Type

mixed — Default null

Methods

instance()

instance() : \MainWP\Dashboard\Module\CostTracker\self::$instance

Method instance()

Create public static instance.

Returns

\MainWP\Dashboard\Module\CostTracker\self::$instance

valid_api_request_data_by()

valid_api_request_data_by(string  $by, string  $value) : mixed

Method valid_api_request_data_by()

Parameters

string $by

By.

string $value

Value.

Returns

mixed —

Result.

prepare_api_costs_data()

prepare_api_costs_data(array  $costs) 

Method prepare_api_costs_data()

Handle get all costs.

Parameters

array $costs

costs.

get_cost_field_value()

get_cost_field_value(object  $cost, string  $field) : string

Method get_cost_field_value().

Parameters

object $cost

Object containing the cost data.

string $field

Data cost field.

Returns

string —

value.