PendingMetric
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.
at line 35
string
key()
Get the metric key.
at line 43
MetricType
type()
Get the metric type.
at line 51
Application
application()
Get the application for the metric.
at line 59
mixed
option(string $key, mixed $default = null)
Get an option for the metric.
at line 67
array
options()
Get the options for the metric.
at line 75
void
setSubscriberCount(int $count)
Set the subscriber count for the metric.
at line 83
void
append(array $data)
Append data to the metric.
at line 91
bool
resolvable()
Check if the metric is resolvable.
at line 99
array
resolve()
Resolve the data for the metric.