考虑下面的代码,为什么它仍然抛出一个错误-- Using $this when not in object context说--即使我使用bindTo函数来设置Class A的上下文 // suppose to bind the instance of class a for $something
$something->bindTo
prometheusRegistry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
new JvmGcMetrics().bindTo(prometheusRegistry); new JvmCompilationMetrics().bindTo(prometheusRegistry);