MMOframework
Pourquoi l'IA Playground Bibliothèques Documentation Rechercher Agence
FR EN
Index

Metrics

MMO\admin\monitoring · 1 symbole · générée le 27 Oct 2026

class

Metrics

Metrics.php:16

What an application says about itself, collected for the hub's application probe: php and its opcache, the packages it runs and their versions, the release it is, and what its providers count (iMetricsProvider).

class MMO\admin\monitoring\Metrics
Espace de noms
MMO\admin\monitoring
Numbers are metrics (`add`), cumulative numbers counters (`counter`: the hub makes them rates), strings facts (`fact`); a check (`check`) is a verdict with its reason, which makes the reading's status on the hub.
$metrics = Metrics::Collect([UsersMetrics::class]); $metrics->toArray(); // {metrics, counters, facts, checks, packages}

Propriétés5

checks

protected array $checks = []
Type
array

counters

protected array $counters = []
Type
array

facts

protected array $facts = []
Type
array

metrics

protected array $metrics = []
Type
array

packages

protected array $packages = []
Type
array

Méthodes9

builtin($root)

Metrics.php:79

What every MMOFramework application can say without being asked to.

protected function builtin(?string $root): void
$rootnull | string
retournevoid

Collect($providers, $root)

staticMetrics.php:35
static function Collect(array $providers = [], ?string $root = null): self
$providers = []arrayclass names (the configuration's) or instances of iMetricsProvider
$root = nullnull | stringthe application's folder: its .release stamp
retourneselfphp's, the packages', and every provider's; a provider that throws is a failed check, not an error

toArray()

Metrics.php:74
function toArray(): array
retournearrayarray, counters: array, facts: array, checks: list<array>, packages: array<string, string>}