prefix = $prefix; } public function produceStatsdData( $key, $value = 1, $metric = self::STATSD_METRIC_COUNT ) { $this->buffer[] = $entity = $this->produceStatsdDataEntity(); if ( $key !== null ) { $prefixedKey = ltrim( $this->prefix . '.' . $key, '.' ); $entity->setKey( $prefixedKey ); } if ( $value !== null ) { $entity->setValue( $value ); } if ( $metric !== null ) { $entity->setMetric( $metric ); } return $entity; } public function getBuffer() { return $this->buffer; } }