class PendingMetric

Properties

protected int|null $subscribers

The number of subscribers for the metric.

protected array $data

The data for the metric.

Methods

__construct(string $key, Application $application, MetricType $type, array $options = [])

Create a new pending metric instance.

string
key()

Get the metric key.

MetricType
type()

Get the metric type.

application()

Get the application for the metric.

mixed
option(string $key, mixed $default = null)

Get an option for the metric.

array
options()

Get the options for the metric.

void
setSubscriberCount(int $count)

Set the subscriber count for the metric.

void
append(array $data)

Append data to the metric.

bool
resolvable()

Check if the metric is resolvable.

array
resolve()

Resolve the data for the metric.

Details

at line 24
__construct(string $key, Application $application, MetricType $type, array $options = [])

Create a new pending metric instance.

Parameters

string $key
Application $application
MetricType $type
array $options

at line 35
string key()

Get the metric key.

Return Value

string

at line 43
MetricType type()

Get the metric type.

Return Value

MetricType

at line 51
Application application()

Get the application for the metric.

Return Value

Application

at line 59
mixed option(string $key, mixed $default = null)

Get an option for the metric.

Parameters

string $key
mixed $default

Return Value

mixed

at line 67
array options()

Get the options for the metric.

Return Value

array

at line 75
void setSubscriberCount(int $count)

Set the subscriber count for the metric.

Parameters

int $count

Return Value

void

at line 83
void append(array $data)

Append data to the metric.

Parameters

array $data

Return Value

void

at line 91
bool resolvable()

Check if the metric is resolvable.

Return Value

bool

at line 99
array resolve()

Resolve the data for the metric.

Return Value

array